johannesjo / super-productivity

Super Productivity is an advanced todo list app with integrated Timeboxing and time tracking capabilities. It also comes with integrations for Jira, Gitlab, GitHub and Open Project.
http://super-productivity.com
MIT License
11.02k stars 872 forks source link

[Feature] Flatpak package #25

Open patriziobruno opened 6 years ago

patriziobruno commented 6 years ago

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

johannesjo commented 6 years ago

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.

patriziobruno commented 6 years ago

@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.

johannesjo commented 6 years ago

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! superProductivity@1.6.6 build: `gulp build && electron-packager . superProductivity --platform linux --arch x64 --out dist/`
npm ERR! spawn ENOENT
npm ERR! 
npm ERR! Failed at the superProductivity@1.6.6 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

patriziobruno commented 6 years ago

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?

johannesjo commented 6 years ago

Sounds great! :)

Patrizio Bruno notifications@github.com 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 commented 6 years ago

Closing this due to inactivity. Feel free to reopen!

kolya-ay commented 4 years ago

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

kaushalyap commented 4 years ago

@patriziobruno @johannesjo Any progress with this?

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

johannesjo commented 4 years ago

@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.

kd2flz commented 3 years ago

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.

johannesjo commented 3 years ago

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).

github-actions[bot] commented 3 years ago

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

kd2flz commented 3 years ago

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...

johannesjo commented 3 years ago

@kd2flz doesn't seem like it :(

kd2flz commented 3 years ago

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

johannesjo commented 3 years ago

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

FilBot3 commented 3 years ago

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 commented 3 years ago

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.

johannesjo commented 3 years ago

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.

aripollak commented 3 years ago

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

FilBot3 commented 3 years ago

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?

johannesjo commented 3 years ago

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?

FilBot3 commented 3 years ago

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.

johannesjo commented 3 years ago

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?

FilBot3 commented 3 years ago

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 commented 3 years ago

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.

johannesjo commented 3 years ago

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.

FilBot3 commented 3 years ago

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.

github-actions[bot] commented 2 years ago

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

johannesjo commented 2 years ago

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

realmx2 commented 2 years ago

I'm not a coder, but if it's just putting in the time to figure it out I can try to help. I love SP, but being on Arch I hate how all system dialogs have alien text and are unreadable (snap font issue). So flatpack would be much more preferred.

FilBot3 commented 2 years ago

So, I opened a discussion for building the application, Discussion https://github.com/johannesjo/super-productivity/discussions/2092 . Seeing missing libcrypt.so.1 errors.

rugk commented 2 years ago

It would be nice if you could publish this as a flatpak on flathub e.g. Flatpaks are a new software distribution mechanism for Linux distros, can thus installed on any distro and are easy to update. Here is how to get started.

Though most likely you know much of that… the thing I see is you already distribute it as a snap, but seem to wonder why distribute it as a flatpak then…

Well… I personally would prefer flatpak. In contrast to snap, you can also self-host it, so you stay in control, and it is widely supported. (snap is not so nice to setup in many distros and snap's security depends on AppArmor, which is not always available in many distros) Also – in contrast to snaps – flatpaks do not only claim to be distro-independent, but actually are and they are widely adopted. Furthermore even Linux Mint criticizes snap, because you cannot self-host a snap server as it is proprietary and (thus) also cannot modify the packages that are served centralized by Ubuntu.

So flatpaks are clearly superior and snaps are basically Ubuntu-only, which means Linux support is not given. And compared to manually packaging rpms or deps, you only need to package it once for all.

FilBot3 commented 2 years ago

It would be nice if you could publish this as a flatpak on flathub e.g. Flatpaks are a new software distribution mechanism for Linux distros, can thus installed on any distro and are easy to update. Here is how to get started.

Though most likely you know much of that… the thing I see is you already distribute it as a snap, but seem to wonder why distribute it as a flatpak then…

Well… I personally would prefer flatpak. In contrast to snap, you can also self-host it, so you stay in control, and it is widely supported. (snap is not so nice to setup in many distros and snap's security depends on AppArmor, which is not always available in many distros) Also – in contrast to snaps – flatpaks do not only claim to be distro-independent, but actually are and they are widely adopted. Furthermore even Linux Mint criticizes snap, because you cannot self-host a snap server as it is proprietary and (thus) also cannot modify the packages that are served centralized by Ubuntu.

So flatpaks are clearly superior and snaps are basically Ubuntu-only, which means Linux support is not given. And compared to manually packaging rpms or deps, you only need to package it once for all.

Currently working on this. I'm close to getting Super-Productivity to compile in the Flatpak so it can be built from source instead of using binaries, which is what the Flathub maintainers would like. This then opens up the application to working on ARM as well as x86 CPU architectures. However, I would recommend any generic replies such as wanting this to be done moved to the discussion linked above at Discussion https://github.com/johannesjo/super-productivity/discussions/2092 .

rugk commented 2 years ago

Sorry I though the discussion rather was about the specific installation/build issue you had there (see the title there about some library error etc.).

But anyway, great to hear there's progress on that! :blush:

rugk commented 2 years ago

BTW here is how another Electron project added snap and flatpak support (looks quite easy from what I see): https://github.com/padloc/padloc/pull/488

iSaluki commented 2 years ago

I think this should be prioritised over snap support as flatpak is more widely used and supported.

github-actions[bot] commented 1 year ago

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

patriziobruno commented 1 year ago

Flatpaking electron apps has become easier than ever. Slack and Visual Studio Code are perfect examples

gleb-28 commented 1 year ago

hi there! any update on this? what's left to do? mb i could help

johannesjo commented 1 year ago

Thanks for the welcome offer @gleb-28 ! There are three things to do:

  1. electron builder needs to be configured properly to build for flatpak
  2. publishing to flathub needs to be setup somehow
  3. CI (github actions) should be configured for automated deployments to flathup
tominglis commented 1 year ago

It would be great to have this as a Flatpak! I am very happy to help test it.

bruteforks commented 1 year ago

So flatpak's are definitely the future, but I can understand not wanting to support yet another platform. If you can get it on flathub, I believe you will definitely see increased usage of your app. Wondering if anyone is currently working on this? @FilBot3's repo says he got it kinda working. I know very little about electron but would like to learn it

FilBot3 commented 1 year ago

So flatpak's are definitely the future, but I can understand not wanting to support yet another platform. If you can get it on flathub, I believe you will definitely see increased usage of your app. Wondering if anyone is currently working on this? @FilBot3's repo says he got it kinda working. I know very little about electron but would like to learn it

I did get it to work, but I was copying the binary instead of building for Flatpak directly. I never figured that out. I'd you figure that out, it should work.

Gorgeous-Goose commented 1 year ago

A flatpak of this would be quite a bit more preferable to snap, not just for the reasons others have mentioned, but because, in my experience, flatpak integrates a lot better with other features. For example, I couldn't get superproductivity to open through an app launcher because of launching through snap and had to make a desktop file for it myself. And I can't assign it to a certain workspace on startup like I would like to do, for the same reason. Both of these things are straightforward to do with flatpak programs.

As for maintaining another deployment, why not add flatpak and drop snap? I don't see what snap is doing that flatpak isn't better for, since the latter tends to be way better for desktop programs.

johannesjo commented 1 year ago

@Goosejack Ubuntu is the most popular distro out there and to be listed in their store the snap is needed. So dropping snap support is – unfortunately – not an option.

aripollak commented 1 year ago

It's relatively straightforward to enable flatpak in the store; it replaces the snap store with gnome-software and the appropriate plugins. Though you might end up having to do it again after upgrading Ubuntu versions.

Screenshot

tominglis commented 1 year ago

Is there anything I can do to help support the Flatpak build? I have not done anything like this before, but happy to support and test.

github-actions[bot] commented 10 months ago

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

shvchk commented 10 months ago

🪄✨