deezer-linux icon indicating copy to clipboard operation
deezer-linux copied to clipboard

Add final Flatpak support

Open aunetx opened this issue 4 years ago • 10 comments

Flatpak is still not well finished.

Last steps would be:

  • [x] upload the repo to github pages to have it available publicly
  • [ ] update automatically the repo by github actions
  • [x] pack a flatpak ref
  • [ ] upload to flathub
  • [x] add MPRIS support (may need to add a patch, does not work anymore even with system-wide installation...)

aunetx avatar Oct 10 '21 10:10 aunetx

About MPRIS support, it does not work for me. playerctl shows nothing. Is it expected to work?

Edit: nevermind, it works, it's just that it only registers once there is something running. It would be nice to have a proper name instead of chromium.instance3, but I suppose this is not trivial.

vincentbernat avatar Jan 31 '22 22:01 vincentbernat

That's cool if it works, but yes sorry for the weird name... I don't control it, and I planned to do something about it at some point -- but that's a patch that I need to add, and it would most probably break horrificly in some months :)

So as long as the current MPRIS thing works (well enough), I guess that's already something :)

aunetx avatar Jan 31 '22 22:01 aunetx

I see that you put the flatpak directly in Git. This will make the repository becomes bigger and bigger. Maybe you could publish from an orphaned branch? This action should help: https://github.com/marketplace/actions/deploy-to-github-pages.

About uploading to Flathub, do you have any contact at Deezer? I have worked from them several years ago, I can poke some people if you want.

vincentbernat avatar Jan 31 '22 23:01 vincentbernat

Yeah, that's a good idea! I started with this approach thinking that the repo would be ok, but it is approaching ½ a GB... I don't know a lot about orphaned branches, but I will experiment with this, and hopefully this should be done in some days!

And about Flathub, I don't know anyone from there (actually, I'm still studying (prépa), so I don't have a lot of contacts anyway); but this could be a good idea!

I don't know how I would do for Flathub, because it needs to have somewhere to download binaries from in order to build the project offline (if I understood correctly...). So I guess this project will still exist, and publish releases automatically; and flathub would then download the most recent release and copy everything in the right place.

So, it would not be very easy, but it seems pretty doable! So I guess contacting Deezer would be interesting, to see if they are ok -- or even better, if they plan to release for linux soon :)

aunetx avatar Jan 31 '22 23:01 aunetx

I can help you with the automated build of flatpak if you want (this week-end for example). Once you have a working flatpak repository, I'll ask some previous colleagues how to get in touch with a current dev.

vincentbernat avatar Feb 01 '22 20:02 vincentbernat

Thank you very much! I guess the flatpak release adapted to flathub would be easy now, as I adapted my github actions to publish release automatically when I push a tag with the correct version name (you can see the makefile for that)

So the next iteration would be to have an action which automatically creates that tag when a new deezer version is released, and then use the generated 7z to create the flatpak with a very simple flatpak-builder file.

I guess I can do this for today night or tomorrow, but I won't be able to put the existing repo in an orphaned branch alone (I have a very bad Internet connection, and the only way I could push without uploading 1gb is by removing all existing versions from the repo and start from scratch, which could lead to bugs for the end user). I guess this is less important anyway, if uploading to flathub is possible

aunetx avatar Feb 02 '22 09:02 aunetx

(sorry for the long comments, that's also a reminder for myself)

aunetx avatar Feb 02 '22 09:02 aunetx

I think you should start from scratch. This will be inconvenient for users, but a repository of 0.5GB is also highly inconvenient. If you don't want to lose the history, there is BFG Repo-Cleaner for that, but in your case, you want to remove a whole directory, so it would be easier to use git filter-branch. I can have a look for precise instructions if you want.

vincentbernat avatar Feb 02 '22 20:02 vincentbernat

Yes, I think this is the best way too. I don't have much time for the moment, but maybe in some days that could be doable!

If you want to do this yourself, I can add you as a collaborator and give you write access to this repo -- the only thing is that you won't be able to sign the flatpaks yourself (as it needs my own gpg key), but this is optional anyway.

aunetx avatar Feb 09 '22 10:02 aunetx

I'll show you on a fork first, since the action would damage the current repository.

vincentbernat avatar Feb 09 '22 16:02 vincentbernat

If I download the flatpak ref file it launches in my Fedora Software GUI but I get an error: Failed to install File: not supported

This is in Fedora Silverblue. I have deezer running in a windows VM but it doesn't play well, audio has ticks and breaks that ruin listening.

S7venLights avatar Nov 06 '22 17:11 S7venLights

Same error here on Fedora 37.

Edit: I successfully installed using the terminal.

ahmedselim2017 avatar Dec 26 '22 15:12 ahmedselim2017

Where are terminal instructions 🙏

S7venLights avatar Dec 26 '22 21:12 S7venLights

You can find it on the flatpak documentation. The command that I had used for this case was flatpak install deezer.flatpakref.

ahmedselim2017 avatar Dec 26 '22 21:12 ahmedselim2017

I tried to upload to flathub: https://github.com/flathub/flathub/pull/4274

There are still problems about it, but once it is done I will remove the flatpak repo from here so that only flathub is used.

aunetx avatar Jun 22 '23 14:06 aunetx

How will we be notified to switch repos?

S7venLights avatar Jun 24 '23 08:06 S7venLights

I still don't know, maybe there exist a way to force a smooth transition of repos for all users... But I doubt it (I will ask); so certainly I will simply push a last update here with a message to switch repos, and after some time I will delete the repo from here (that should not affect users, except notifying that flatpak can't update the app) so that all new installs are only possible through flathub.

I anybody has any idea, I'm very eager to ear!

aunetx avatar Jun 24 '23 17:06 aunetx

@vincentbernat hello again, do you have an email where I can contact directly Deezer? I did not find any, so the only thing I can do contact them on their public forum (I did it here), but there is no visibility to this message...

I don't know if I should contact the devs team or the legal team, but I don't have any email anyway :)

aunetx avatar Jun 24 '23 17:06 aunetx

I have pinged someone I know from Deezer and mentioned this thread.

vincentbernat avatar Jun 24 '23 17:06 vincentbernat

Thanks a lot!

aunetx avatar Jun 24 '23 19:06 aunetx

It is published to flathub: https://flathub.org/apps/dev.aunetx.deezer

I did not intend it to be so fast, I hope it won't be problematic for the deezer team

aunetx avatar Jun 29 '23 14:06 aunetx

I finally rewrote the repository's history, it is now 107kb in size (down from 2.5gb!), so this is finally finished.

The remaining users who are still not using flathub will probably get errors when checking for updates, which should make them visit the repo -- and they simply have to follow the 3-lines instructions on top of the readme to have updates again.

aunetx avatar Sep 18 '23 19:09 aunetx