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

[Feature] Flatpak package #25

Closed
patriziobruno opened this issue Nov 21, 2017 · 70 comments
Closed

[Feature] Flatpak package #25

patriziobruno opened this issue Nov 21, 2017 · 70 comments

Comments

@patriziobruno
Copy link
Contributor

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

@johannesjo
Copy link
Owner

johannesjo commented Nov 21, 2017

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
Copy link
Contributor Author

@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 johannesjo changed the title [Feature request] Flatpak package [Feature] Flatpak package Nov 29, 2017
patriziobruno added a commit to patriziobruno/super-productivity that referenced this issue Nov 29, 2017
patriziobruno added a commit to patriziobruno/super-productivity that referenced this issue Nov 29, 2017
johannesjo added a commit that referenced this issue Nov 30, 2017
Implemented flatpak build. Closes #25
@johannesjo johannesjo reopened this Nov 30, 2017
@johannesjo
Copy link
Owner

johannesjo commented Nov 30, 2017

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

@patriziobruno
Copy link
Contributor Author

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
Copy link
Owner

johannesjo commented Nov 30, 2017 via email

patriziobruno added a commit to patriziobruno/super-productivity that referenced this issue Nov 30, 2017
patriziobruno added a commit to patriziobruno/super-productivity that referenced this issue Dec 1, 2017
patriziobruno added a commit to patriziobruno/super-productivity that referenced this issue Dec 1, 2017
patriziobruno added a commit to patriziobruno/super-productivity that referenced this issue Dec 1, 2017
patriziobruno added a commit to patriziobruno/super-productivity that referenced this issue Dec 1, 2017
johannesjo pushed a commit that referenced this issue Dec 8, 2017
@johannesjo
Copy link
Owner

Closing this due to inactivity. Feel free to reopen!

@kolya-ay
Copy link

kolya-ay commented Feb 9, 2020

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

@johannesjo johannesjo reopened this Feb 10, 2020
johannesjo added a commit that referenced this issue Jul 5, 2020
@kaushalyap
Copy link

@johannesjo
Copy link
Owner

johannesjo commented Aug 21, 2020

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

Copy link

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

@github-actions github-actions bot added the Stale label Nov 26, 2023
@shvchk
Copy link

shvchk commented Nov 26, 2023

🪄✨

@netgrims
Copy link

+1 on this. Though I'm afraid I don't have any experience with this kind of stuff either.

On the subject of reaching the most users, I'm not sure if snap is still the way to go. There aren't any exact numbers, but there are estimates (see https://lunduke.substack.com/p/ubuntu-facing-declining-marketshare, https://distrowatch.com/dwres.php?resource=ranking&sort=votes and https://itsfoss.com/linux-market-share/). It's not dramatic, but doesn't look great for Ubuntu.

@Talleyrand-34
Copy link

+1

@gromenauer
Copy link

This issue seems the most voted now https://github.com/johannesjo/super-productivity/issues?q=is%3Aissue+is%3Aopen+sort%3Areactions-%2B1-desc

johannesjo added a commit that referenced this issue Oct 11, 2024
@DelicateIntegral
Copy link

Isn't this the flatpak for this app? It;s not updated though if it is.
https://github.com/FilBot3/com.superproductivity.SuperProductivity

@johannesjo
Copy link
Owner

Isn't this the flatpak for this app? It;s not updated though if it is. https://github.com/FilBot3/com.superproductivity.SuperProductivity

No. Not up to date any more. Building flatpak isn't the problem anymore. What is problematic is publishing to flathub.

@johannesjo
Copy link
Owner

johannesjo commented Nov 15, 2024

I asked the flathub people if they would allow pushing binaries for Super Productivity as they do with Spotify and other popular apps. Never got a response unfortunately.

@ALL: If more people would start bothering them about this, maybe they would consider this...

@patriziobruno
Copy link
Contributor Author

I asked the flathub people if they would allow pushing binaries for Super Productivity as they do with Spotify and other popular apps. Never got a response unfortunately.

@ALL: If more people would start bothering them about this, maybe they would consider this...

They do allow pushing binaries. All you need is to follow their onboarding guide https://docs.flathub.org/docs/for-app-authors/submission/

There's plenty of non-OSS software on Flathub and publishing it didn't require any special permission by the "flathub people".

@johannesjo
Copy link
Owner

johannesjo commented Nov 15, 2024

Not sure @patriziobruno . We would need to able to publish single flatpak file to make things work as smoothly as possible and to my knowledge this is not possible for everyone, but reserved for only some special projects:

https://discourse.flathub.org/t/is-it-possible-to-publish-a-self-contained-flatpak-file-to-flathub/2083

Everything else seems very tedious to setup. Though I'd be open if someone would offer help with it.

@patriziobruno
Copy link
Contributor Author

You're right, it's not possible to push flatpak binaries. But it's also true that flatpak binaries are basically a hack. I'm not surprised they're not prioritizing that approach. Setting up a flathub repo to deliver your application is not a huge deal. You're already building an AppImage package, you can use it the same way as here https://github.com/flathub/io.stoplight.studio

@DelicateIntegral
Copy link

So, is there any scope for resolving this?

@johannesjo
Copy link
Owner

johannesjo commented Nov 28, 2024

So, is there any scope for resolving this?

Correct me if I am wrong @patriziobruno , but I think there are two approaches:

  1. We bother the flatpak people to allow publishing Super Productivity as a single flatpak file, as they do for other apps (like Spotify ?).
  2. Someone (not me, sorry :)) goes through the hassle to setup "traditional" automated(!) flatpak publishing. Not sure what the steps are, that need to be done, but it likely will be an entire buildchain just for flatpak.

@aripollak
Copy link
Contributor

aripollak commented Dec 4, 2024

I think there's also a third option, which is to build the single flatpak file with electron-builder and just publish it alongside all the other binaries on GitHub. This probably wouldn't be the preferred option for users since it wouldn't auto-update. I have some extra time this week so I'm going to try to set up option 2. Unfortunately option 2 does mean some of the build process would live in a separate repo. They do have an auto-updater bot that would make most updates just a matter of clicking a merge button in a PR, assuming you don't want to auto-merge.

Ongoing build notes:

@johannesjo
Copy link
Owner

johannesjo commented Dec 5, 2024

Thank you @aripollak ! Please let me know, if you have any questions!

The subject with the automerge depends on the specifics. What files would be affected and how often?

@aripollak
Copy link
Contributor

aripollak commented Dec 5, 2024

The subject with the automerge depends on the specifics. What files would be affected and how often?

This would just affect the external flathub repo for the Super Productivity package flatpak source. More info here. Here's an example of an update PR.

@johannesjo
Copy link
Owner

@aripollak Thank you! To me it looks like a dedicated repository is a good solution.

@aripollak
Copy link
Contributor

aripollak commented Dec 5, 2024

@johannesjo I currently have working flatpak package source code at https://github.com/aripollak/flathub/tree/superproductivity. To build and install it locally, once you have flatpak-builder installed:

flatpak remote-add --if-not-exists --user flathub https://dl.flathub.org/repo/flathub.flatpakrepo
flatpak-builder build com.super_productivity.SuperProductivity.yml --install-deps-from=flathub --user --install

And then you can run it with:

flatpak run com.super_productivity.SuperProductivity

Do you want to review to see if it looks good to you? I could submit the PR with flathub myself and add you as a collaborator, or you could create the PR. It should be set up to automatically submit a PR for the new (not yet existing) flathub repo to update the package source and release a new version to flathub. It's set up to build only regular stable releases from GitHub, not prereleases. It'll need to be verified using this process.

@johannesjo
Copy link
Owner

@aripollak that would be great! Personally I am not using flatpak much, so this would not be a passion project of mine. I am all the more grateful if you would handle publishing and maintaining the flathub release, if this is alright for you?

Maybe you can get in touch via [email protected] to align for the verification? We can use super-productivity.com for that, I think.

@aripollak
Copy link
Contributor

aripollak commented Dec 7, 2024

Just so I have this written down somewhere public. Hopefully it will be obsolete at some point in the future with more stable Electron Wayland support, or we could just decide to enable it by default, or include it in the documentation somewhere.

Wayland

To tell this package to always run with native Wayland support (for example, to support sharper text with mixed-DPI displays or allow idle tracking to work under Wayland), run:

flatpak override --user --socket=wayland --env=ELECTRON_OZONE_PLATFORM_HINT=auto org.super_productivity.SuperProductivity

To reset the package back to its default settings, run:

flatpak override --user --reset org.super_productivity.SuperProductivity

If you prefer a graphical user interface instead of using the commandline, these settings can be modified with Flatseal.

Another alternative is to run Super Productivity manually with the options enabled:

flatpak run --socket=wayland --env=ELECTRON_OZONE_PLATFORM_HINT=auto org.super_productivity.SuperProductivity

@johannesjo
Copy link
Owner

Thank you so much @aripollak !

The very first flathub release now seams to be available:
https://flathub.org/apps/com.super_productivity.SuperProductivity

🎉💫🥳❤️

@aripollak
Copy link
Contributor

Further coordination discussion taking place at #3740

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests