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

Flatpak/appimage/Snap etc. #6933

Closed
Hasshu opened this issue Sep 12, 2019 · 56 comments
Closed

Flatpak/appimage/Snap etc. #6933

Hasshu opened this issue Sep 12, 2019 · 56 comments
Labels
meta:feature-request meta:help-wanted Anyone is invited to help with this. Suitable for new developers with no experience with mpv code. meta:rfc priority:wontfix

Comments

@Hasshu
Copy link

Hasshu commented Sep 12, 2019

https://flatpak.org/

I wonder if it would be more feasible than the AppImage format (#4056).

@wiiaboo
Copy link
Member

wiiaboo commented Sep 13, 2019

See #4056.
Wait, you already mentioned it. But probably not, even if releases are eventually automated.

@wiiaboo wiiaboo closed this as completed Sep 13, 2019
@wiiaboo wiiaboo reopened this Sep 13, 2019
@ghost
Copy link

ghost commented Sep 15, 2019

flathub/flathub#1057

@Hasshu
Copy link
Author

Hasshu commented Sep 15, 2019

@Khyber3737 One of the main points of Flatpak, in my opinion, is the possibility to get installable software directly from the developer. I do not — and should not — trust some third-party "Flathub maintainers", hence this here issue.

Or were you referring to #2987?

@ghost ghost added the meta:feature-request label Sep 18, 2019
@ghost
Copy link

ghost commented Sep 18, 2019

Like with AppImage, I don't think we want to maintain such a package. It requires time and care, and we'd have to handle all the bug reports too. Either someone of "us" needs to step in (but nobody seems to be interested in picking up such a task), or someone external has to do it.

In addition, it seems all the GPU API usage (especially hwdec) makes this tricky.

@Akemi Akemi added the meta:rfc label Sep 21, 2019
@ghost ghost added the meta:help-wanted Anyone is invited to help with this. Suitable for new developers with no experience with mpv code. label Sep 28, 2019
@ghost ghost changed the title Flatpak Flatpak/appimage/Snap etc. Sep 28, 2019
@ghost
Copy link

ghost commented Sep 28, 2019

This issue is hereby about all "distro-independent" packaging methods for Linux, since this comes up every so often.

@eszlari
Copy link

eszlari commented Dec 6, 2019

I would like to help you with the flatpak. After the build manifest is written and tested, the ongoing maintenance burden should be low: in the most simple case, it means just updating the URL and SHA256 of the tarball for a new release through the Github UI.

Flathub uses buildbot (https://flathub.org/builds). Builds get triggered automatically when committing to the master branch at Flathub or when opening PRs. Preview release/beta builds are also supported.

So if you are interested, I can write the manifest and submit a PR to Flathub. Then mpv developers would get commit access to the repo with mpv's manifest.

Just to two things need to be decided:

  1. What should be the app ID (reverse DNS)? io.mpv.mpv?
  2. manifest format: JSON or YAML?

@ghost
Copy link

ghost commented Dec 6, 2019

Well, nice.

If the thing gets built in a transparent and public way, all the better I guess.

I hope this doesn't require any metadata or similar in the mpv repo itself?

What should be the app ID (reverse DNS)? io.mpv.mpv?

Well, we currently own the domain (or rather one of the developers does), so I guess that's OK.

@Akemi
Copy link
Member

Akemi commented Dec 6, 2019

@eszlari
Copy link

eszlari commented Dec 6, 2019

I hope this doesn't require any metadata or similar in the mpv repo itself?

The single (small) metadata file, that is needed, could be put in either repo. But since it's not specific to flatpak, it would make more sense (and preferred by Flathub) to be put in the upstream repo. Software managers like GNOME Software or KDE Discover use it to display infos about an app, no matter if they are packaged as flatpak or traditional Linux packages formats.

io.mpv is what the mpv macOS bundle uses.

It needs to have 3 elements, e.g.
io.mpv.mpv
io.mpv.MPV
io.mpv.Player
etc.

@PranavBhattarai
Copy link

Any 2021 approach toward this!?

@jeeb
Copy link
Member

jeeb commented Apr 24, 2021

I tried to build a snap of mpv some time ago (https://github.com/jeeb/mpv/commits/le_snap) but the result was sub-optimal.

  1. The graphics drivers.
  2. pulseaudio worked for my laptop, but not for another person.

@philipl
Copy link
Member

philipl commented Apr 24, 2021

AppImage would probably be the easiest as that doesn't involve any sandboxing.

@PranavBhattarai
Copy link

Ubuntu 21.04 which was released 2 days ago still has the old 0.32.0 version.
MPV was not updated in the APT repo. So I was thinking maybe I should try other package management systems like Snap & Flatpak which are more popular. But sadly, Snap has an unofficial older build and Flaptak doesn't have MPV at all. PPA is barely maintained.

It's too hard to get updated MPV these days unless you compile it yourself, which is kind of a bummer for the normal user to go through. I wish things were a bit easier.

@CounterPillow
Copy link
Contributor

It's too hard to get updated MPV these days

My somewhat unhelpful suggestion is to use a better distro. mpv 0.33 was released in November. Someone even told the debian-multimedia maintainers to package it, but they did not do so.

@Hasshu
Copy link
Author

Hasshu commented Apr 25, 2021

My somewhat unhelpful suggestion is to use a better distro. mpv 0.33 was released in November. Someone even told the debian-multimedia maintainers to package it, but they did not do so.

This issue was opened exactly in hopes of cutting out the middleman.

@danrobi11
Copy link

About a binary release like youtube-dl does ? Users just need to chmod it like an appimage.

Otherwise why not a deb file then ?

@fastrizwaan
Copy link

fastrizwaan commented Apr 30, 2021

If you allow me, I'll maintain mpv flatpak at flathub.

https://github.com/fastrizwaan/mpv_flatpak

@fastrizwaan
Copy link

Congrats! MPV is now available at flathub https://flathub.org/apps/details/io.mpv.Mpv

@Hasshu
Copy link
Author

Hasshu commented May 7, 2021

@fastrizwaan It's cool and all, but I'd rather wait for an official release.

@danrobi11
Copy link

@Hasshu
What do you mean by "official release" ?
MPV is now availabe on flathub
You aint going to get more "official" than that tbh.
Dont expect MPV lead dev to maintain the flatpak.
More than half of the flatpaks are maintained by the community.
Same for AppImages.

@Hasshu
Copy link
Author

Hasshu commented May 8, 2021

@danrobi11

What do you mean by "official release" ?

Exactly that — a release done by the mpv developers themselves, and not some third party.

You aint going to get more "official" than that tbh.

How do you know?

Dont expect MPV lead dev to maintain the flatpak.

Why not?

More than half of the flatpaks are maintained by the community.

And that's a bad thing.

You probably have been using Linux for a long enough time to get used to this asinine notion of random people packaging someone else's software, but no matter how you look at it, it's a bug — not a feature. Blame the package-format fragmentation and the NIH syndrome that led to it.

Same for AppImages.

First-party AppImages are a thing, though.

@garoto
Copy link
Contributor

garoto commented May 8, 2021

So if fastrizwaan was to be made a member of the "mpv-player virtual organization", which is only a thing on this website alone, would that make it official enough for you? I just don't get it.

@Akemi
Copy link
Member

Akemi commented May 8, 2021

we don't and won't provide 'official' binaries, pre-build packages, etc.. if anything changes on that stance, we will let you know.

@Akemi
Copy link
Member

Akemi commented May 16, 2021

i would say, close it if and when we put a link on our page. though the if and when is nothing i want to decide on my own.

[edit]
PRs are probably welcome so we can discuss it.

@Hasshu
Copy link
Author

Hasshu commented May 16, 2021

Did I miss something?

@Pentaphon
Copy link

If flathub is looked down upon and distro repos are considered too out of date, what is the best way to install mpv on a Linux distro?

@nathanfranke
Copy link

If flathub is looked down upon and distro repos are considered too out of date, what is the best way to install mpv on a Linux distro?

I guess PPAs on Ubuntu and the official arch repositories (updated often)

@Pentaphon
Copy link

I guess PPAs on Ubuntu and the official arch repositories (updated often)

But PPAs are basically looked down upon as well because of how often they break things and not everybody runs Arch.

Flatpak seems like a good solution unless there is actually something better and always up to date.

@nathanfranke
Copy link

But PPAs are basically looked down upon as well because of how often they break things and not everybody runs Arch.

Flatpak seems like a good solution unless there is actually something better and always up to date.

Agree that Flatpak would be a great cross-platform solution

@MintMain21
Copy link

I'm using the MPV Flatpak on Linux Mint 20.3, and while a few plugins I use have compatibility issues (mpv-bookmarker) it otherwise works as intended. That being said, I generally prefer Appimages as they use (in my experience) less space compared to Flatpaks, and can easily be integrated into the system.

Seeing as it took a 3rd party to make the Flatpak a reality, I'll just say right here that there is an audience for a Appimage as well.

@Pentaphon
Copy link

I generally prefer Appimages as they use (in my experience) less space compared to Flatpaks, and can easily be integrated into the system.

It's a video player. It doesn't take that much space. It was hard enough to get somebody to work on a Flatpak. Don't hold your breath on an appimage, especially considering how well the flatpak is working. I don't see much of a future for appimage anyway. It seems more and more like appimage is on its way out and flatpak and snap are here to stay.

@Hasshu
Copy link
Author

Hasshu commented Jan 14, 2022

@MintMain21 See #4056.

@ssokolow
Copy link

ssokolow commented Mar 4, 2022

Quick question. Should I open another feature request specifically to ask that the unofficial Flathub release be added to the "All of these packages are unofficial." Linux section of https://mpv.io/installation/?

Also...

That being said, I generally prefer Appimages as they use (in my experience) less space compared to Flatpaks

Appimages don't support deduplicating dependencies, while Flatpak aggressively deduplicates dependencies. While Flatpak may take more space for a single application, the cost is spread across all the applications you install.

(Part of the purpose of the Flatpak Runtimes, having the GNOME and KDE runtimes build on top of the Freedesktop Runtime, and having the BaseApp system of pre-built starters for what you do bundle, such as Electron or QWebEngine, is to ensure that as many of your dependencies as possible have identical file hashes, so the file-level deduplication and "download only the pieces we need" can have maximum effect.)

Also, Appimages suffer from the same "Which dependencies should be bundled?" problem as GOG.com, but make it more difficult to delete "shouldn't have been bundled" .so files when a distro update introduces a segfault-on-startup bug.

@Pentaphon
Copy link

Quick question. Should I open another feature request specifically to ask that the unofficial Flathub release be added to the "All of these packages are unofficial." Linux section of https://mpv.io/installation/?

You should post it on the issues page for the website here: https://github.com/mpv-player/mpv.io/issues

@ssokolow
Copy link

ssokolow commented Mar 4, 2022

Thanks. Will do. :)

@Pentaphon
Copy link

anyway it has various reasons and everyone has different concerns. though at one point we might provide official builds, maybe through our CI.

@Akemi Is there anything that you and @fastrizwaan can do to make his Flathub builds official to the project? I think doing so would go a long way in building confidence in the Flathub builds, giving mpv users more install options and making sure that both the official releases and Flathub are totally in sync. Flatpak is being used more and more every year and embracing it sooner rather than later will only benefit the project in the long run.

@applecuckoo
Copy link

Don't know if this conversation is still active, but another reason that Flatpak is a good idea is that Flatpak has a mechanism for plugins, here's an example with OBS Studio's official flatpak displaying in Mint's Software Manager.
Software Manager_001

@MintMain21
Copy link

Distributing MPV Plugins as a Flatpack is an attractive option, so long as there remains an easy and accessible way to edit the Plugins either as if (or better than if) they were lua.scripts downloaded on the user's end.

@ssokolow
Copy link

Distributing MPV Plugins as a Flatpack is an attractive option, so long as there remains an easy and accessible way to edit the Plugins either as if (or better than if) they were lua.scripts downloaded on the user's end.

For all the other benefits, on that particular note, unfortunately, Flatpak is designed around the assumption that users will not be editing the contents of Flatpak packages but, instead, will either uninstall/disable them and install a plugin under $HOME or will use some application-provided overlay mechanism if they need patched versions.

That's why I don't install LibreOffice via Flatpak. Because the only way I'm aware of to disable the periodic "Donate" and "Get Involved" nag-bars is to drop a file into $BASEDIR/share/registry, which is part of /app and, thus, not to be modified under Flatpak. (Whereas, with the distro packages, it's just a sudo away and won't get removed on update.)

@Hasshu
Copy link
Author

Hasshu commented May 7, 2023

Apologies for the ranty bump, but this is getting frustrating...

mpv's official site complains that "distributions usually package outdated, unmaintained, and unsupported versions of mpv". Now, the distro I use (Fedora Linux) does provide an up-to-date version of mpv, but a full-featured version of FFmpeg has to be downloaded from RPM Fusion, a third-party repo. I strive to never have to deal with third parties (and RPM Fusion in particular) when it comes to software, so using their packages is not an option for me. Thus I tried to use some of the static FFmpeg builds mentioned on the official site. I made sure that the bundled ffmpeg is the first thing under whereis, but it wouldn't to work for some reason: Failed to initialize a decoder for codec 'hevc'.

mpv's official site also hints at building everything yourself instead. I did try to compile FFmpeg once... By now I don't recall the details, but that littered my system with lots of unneeded packages, took many retries, and didn't even work in the end. Frankly, I don't want to deal with that ever again. And something tells me that few would even bother to try. They would rather use those "outdated, unmaintained, and unsupported versions of mpv", and then go on the bug tracker to complain.

But all of the above wouldn't be an issue, if there were an official way to get the most recent version of mpv, no matter the distro... Y'know, one build to rule them all. Oh, and the "official" part is as important as ever, since Flathub has introduced support for verified apps recently. Please, give it some thought.

Also, here's an inspirational example of how developers were hesitant about Flatpak at first, but ended up embracing it: keepassxreboot/keepassxc#1524

@fastrizwaan
Copy link

@Hasshu Does Linus Torvalds release an official binary Linux kernel package for you to install? It's Free OSS.

What is a Linux Distribution?
A collection of compiled binaries from various sources which includes gnu tools and Linux kernel and other open source software. So, in this sense, whichever distro you are using, you are basically using unofficial packages bundled by third parties.

@ssokolow
Copy link

ssokolow commented May 7, 2023

@fastrizwaan

The Linux kernel is a massive anomaly, in that it's pretty much the only kernel developed independently from its userland. (Which is also why it's the only kernel of note with ABI-stable syscall numbers.)

FreeBSD, OpenBSD, NetBSD, DragonflyBSD, Haiku, ReactOS, RedoxOS, and every other open-source project of note which produces an OS kernel do offer official builds.

What is a Linux Distribution?

A collection of compiled binaries from various sources which includes gnu tools and Linux kernel and other open source software. So, in this sense, whichever distro you are using, you are basically using unofficial packages bundled by third parties.

And Flatpak is designed to make it easy and comfortable for upstreams to offer a single official build while only having to test it against one target: the Flatpak runtime they specify in their build manifest.

To that end, not only does it take a Docker-like containerized approach, Flathub runs a bot that you can configure so that you just go about your normal release process and the Flathub infrastructure will detect that you've made a release (or that one of your dependencies has done so), generate a test build (including running any automated tests you specify as part of the build process), and all you have to do (aside from any release testing you have yet to automate) is accept the PR the bot opens and, after a three-hour grace period to allow for realizing you've made mistakes, the new Flathub release goes live.

(Source: I did the legwork to get PySolFC on Flathub and that's how I set it up.)

@Hasshu
Copy link
Author

Hasshu commented May 7, 2023

@fastrizwaan While it makes sense for the Linux kernel (and certain system software) to be packaged by the distribution maintainers, there is no need to treat application software the same way in this day and age. We have the technology.

@Dudemanguy
Copy link
Member

I think it's pretty obvious that none of us are going to maintain an official flatpak/appimage/whatever at this point. I know there's already an existing flatpak someone maintains, so if the author wants us to list it on the website feel free to open up a PR at mpv.io

@fastrizwaan
Copy link

@Dudemanguy

Could you please look into this, mpv-player/mpv.io#103 it fails.

I just added haml code

= package_row 'Flatpak (Flathub)', 'https://flathub.org/apps/io.mpv.Mpv'

fastrizwaan/mpv.io@7df1aa5

Thanks.

@in-plaintext
Copy link

The Flatpak package of mpv is still at the time bundling two (potentially unwanted) scripts — there may not be an easy way to remove the scripts.

I see no LUA files with descriptive titles:

  $ fd --extension lua . /var/lib/flatpak/app/io.mpv.Mpv/

@AsciiWolf
Copy link

Any update? Linux Mint will hide unverified Flatpak apps from search results (and other distributions will probably follow).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
meta:feature-request meta:help-wanted Anyone is invited to help with this. Suitable for new developers with no experience with mpv code. meta:rfc priority:wontfix
Projects
None yet
Development

No branches or pull requests