To everyone saying you can’t mirror a flatpak repo… you’re absolutely right. There should be a far easier way to set up your own mirror without needing to build everything from scratch. That being said, if you wanted to try to make your own repo with every one of flathub’s apps, here you go:
https://docs.flatpak.org/en/latest/hosting-a-repository.html
Edit: Some did get a flathub mirror working. The issue is that a. Fastly works good enough and b. There is no concept of “packages” on the server side. It’s just one big addressed content store because of ostree, and syncing is apparently difficult? Idk, not being able to sync the state of content is like the entire point of ostree…
Honestly I would prefer to just donate
It’s not about funding. Many prefer mirrors because the main instance isn’t globally available (the GitHub issue I linked, for example, is all about people trying and failing to access flathub in China) or because they can’t for compliance reasons (many businesses already mirror stuff like epel, too, which is what throws off Rocky’s stat counters). Neither of those issues can be assessed by throwing more money at a CDN.
Well that isn’t the fault of Flathub. If a country or organization blocks it that’s a local issue. This is especially true in China where they need to control the movement of information. Blaming flathub and Flatpak for censorship is frankly unfair.
Just to be clear I do not support Chinese Authoritarianism
I’m not sure if anyone said it was the fault of flathub. My point is that, regardless of fault, accessibility to the main instance is an issue for several reasons, and a good way to solve it is to build a system for mirrors.
Your bypassing restrictions that could get you in trouble. Tor is the right answer in that case. However, bypassing restrictions can have dire consequences.
There are existing mirrors for Fedora and Ubuntu packages in China, which are used because mirrors in other countries are often blocked. I’m sure there are no legality issues—the issue in the case of flatpak and china in particular is that China blocks Fastly because Fastly does not host any POPs in China. This is why Cloudflare, for example, has their own network in China that international users can pay to use. There’s no legal issues here, just logistical. Besides, as previously shown, people do (with great difficulty) managed to bring up their own flatpak mirror without any consequences for a few years now.
Besides, there shouldn’t be legality issues for businesses wanting to host their own mirrors for compliance issues.
I just think Flathub shouldn’t get involved with Chinese attacks on human rights. The Chinese version of things lack proper encryption and are heavily censored. You can’t use things like normal Wikipedia or Ticktok.
China isolates there own people. You can’t blame Flathub for attacks on freedom. As for mirrors your welcome to create your own repo based on Flathub. However, it is never going to be officially enforced. Flathub is very careful with user safety.
Oh no, this is Flatpaks’ fault because they made this twisted repository system instead of doing sane things and then it is Flathub’s fault as well because they aren’t opening their storage to rsync or other sane syncing methods.
Twisted repo system
Oh no, the evil repos
Even Microsoft’s Winget repository is easier to deal with than Flathub.
Yeah no, it isn’t. I know that from experience. It constantly goes down and is controlled by Microsoft so it favors there way of thinking.
Sorry to ask, I’m not really familiar with Linux desktop nowadays: I’ve seen Flatpak and Flathub talked about a lot lately and it seems to be kinda a controversial topic. Anyone wanna fill me in what’s all the noice about? It’s some kind of cross-distro “app store” thingy?
Flatpak is a universal application packaging standard for Linux. It allows devs to create a single application that gets bundled with all necessary dependencies including versioning.
These apps run in their own semi-isolated “container” which makes immutable distros possible. (Distros like Fedora Silverblue that are effectively impossible to break by installing or removing critical system files.)
This means that a Linux app doesn’t have to have a .deb version, an .rpm version, or be pre-compiled for any other distros. A user can simply go to Flathub, (the main repository for Flatpak apps), download the flatpak, and install it on their distro of choice.
It’s quickly becoming the most popular way for users to install apps on Linux because it’s so easy and quick. But there are a few downsides like size on disk, first party verification, per-distro optimizations, and the centralization of application sources. That’s why some users aren’t fully endorsing or embracing how popular they are becoming.
Interesting breakdown, thank you.
Do you happen to know if the containerization is similar to docker containers? Or more like android apps?
It used bubblewrap which is kind of like a chroot.
I’m not an expert, but from my understanding, more like android apps.
They aren’t totally isolated like a docker or LXC container would be, but they are generally self-contained.
The Linux Experiment has a really great vid that goes into detail on all common packaging formats in Linux including Flatpaks:
It’s more like android apps from early versions of Android before the permissions became user-managable.
It won’t prompt you to give the application access to certain permissions, all the permissions are predefined in the manifest by whoever published the application to flathub. When you run the application you just hope it won’t cause too much havoc (you can of course verify the permissions before running it, but I guarantee most people won’t)
Flatpak supports sandboxing but due to how most desktop applications want access to your home folder, network etc many apps simply disable it.
Regardless of the level of sandboxing applied to the app, Flatpak is a great way for a developer to package once run anywhere. Prior to Flatpak, if you wanted to support multiple distros, you had to build a package for each distro or hope somebody working on that distro would do it for you.
Inb4 AppImage was here first. And if you mention Snap then GTFO
Keep in mind there are certain permissions that can lead to a sandbox escape. These permissions are banned on Flathub but can still be used by flatpaks files and custom repos.
Appimage is probably the most similar to a naked .exe in Windows. They are useful for small apps or simple indie games, but I prefer Flatpaks for my everyday big applications.
Agreed, Snaps are like Flatpaks but worse because locked down back end and Canonical’s sketchy nature. Imagine a really delicious pastry that anybody can make and sell, then imagine the same pastry but only one bakery in the world can make and sell it. Which would you prefer? Lol
Cool, thanks for the explanation.
a single application that gets bundled with all necessary dependencies including versioning
Does that mean that if I were to install Application A and Application B that both have dependency to package C version 1.2.3 I then would have package C (and all of its possible sub dependencies) twice on my disk? I don’t know how much external dependencies applications on Linux usually have but doesn’t that have the potential to waste huge amounts of disk space?
It’s not quite that simple.
Each package can choose one from a handful of runtimes to use, each of which include common dependencies (like gnome or qt libraries), and if multiple flatpaks use the same runtime, that runtime is only downloaded once.
It is less space efficient than your typical package manager, but brings other benefits like sandboxing.
Most dependencies are bundled in the “runtime” images, and it uses file deduplication to reduce the size of the dependencies, but it’s still a little more than a normal package manager.
Not necessarily. GNOME and KDE dependencies and “base system” for flatpaks to run in are flatpaks themselves so apps that depend on them will not use duplicated dependencies. Storage usage may not be as efficient as using a traditional package manager but you don’t install a new OS per app either.
Flatpak as a dependency system that allows use of specially packaged library type flatpaks. This significantly reduces the needed disk space.
on a desktop it might not be significant but I tried using flatpak apps on a device with very limited root emmc storage (16 GB) and ran out of space really fast. Its really common to see a couple multi-hundred-megabyte library downloads for each new app IME.
I like them for some stuff but there are glaring issues that I don’t like. I’ve posted about it before, poor integration of apps/not getting the right permissions is a big problem, the people packaging them don’t often do as good of a job as someone like a distro maintainer.
But admittedly my experience using it probably isn’t representative (pop os through their shop and arch on a mobile device). Neither were amazing, but not having to compile shit myself or install with an untrusted shell script was nice for some apps. Without some significant improvements it’s not a good replacement for a distro’s package repos but it might be a good way to broaden the available applications without having to maintain 10x more packages.
Essentially yes, if you start using lots if older applications or mixing applications that use many different dependency versions, you will start to use lots of extra disk space because the different apps have to use their own separate dependency trees and so forth.
This doesn’t mean it will be like 2x-3x the size as traditional packages, but from what I’ve seen, it could definitely be 10-20% larger on disk. Not a huge deal for most people, but if you have limited disk space for one reason or another, it could be a problem.
It CAN get pretty wild sometimes, though. For example, Flameshot (screenshotting utility) is only ~560KB as a system package, while its flatpak version is ~1.4GB (almost 2.5k times as big)
Flameshot is 3.6MB on disk according to
flatpak info org.flameshot.Flameshot
Weird, the software manager (using LM 21.3) reports 1.1GB dl, 2.4GB installed (which is different from when i checked yesterday for some reason?).
flatpak install
reports around 2.1GB of dependencies and the package itself at just 1.3MBEDIT: nvm im stupid, the other reply explains the discrepancy
no, that number don’t reflect the shared runtimes and deduplication
What about those apps using out of date libraries? Wouldn’t that become a security issue - since containers usually aren’t that secure, right? And all app developers would have to update their container libraries separately, instead of just updating the system libraries?
As containers are isolated - it’s mostly a security issue for the container itself. It may become an issue, though, if the container is allowed to freely interact with filesystem, for example.
Apps like Flatseal allow you to easily control such variables using a GUI instead of tinkering in the terminal.
So if a library is out of date you can just update it. As far as containers go they are fine for security as bubblewrap is pretty solid.
Flatpak is the best - thats all you need to know!!!
But seriously, apart from obvious things other people have said, I would like to add that the HUGE advantage of flatpak is that each app is using its own dependencies, this way you can avoid dependency hell, which is mostly time-consuming and hard to fix.
Was controversial when it was new and full of problems. Now it is mostly the standard for apps.
Well, just by looking at responses in this thread, the controversy most definitely still exists. Some seem to like it and others hate it fiercely.
I think the haters are louder than the people who just use it occasionally
yes it’s cross distro, it’s controversial becaune some people don’t want to install apps with their own libraries or dependecies, and some apps are not oficial so they break with the flatpak sandbox
Most of the issue is that they’re unreliable. Sometimes the app will work. Sometimes it doesn’t. Sometimes you have to fiddle blindly with flatseal settings, which ones? Who knows? Guessing is part of the fun.
It’d be a great thing if it just worked.
In over 3 years of daily flatpak use (of multiple apps) I’ve never had a single reliability issue with flatpak, the only ones being caused by me because I was trying out settings in flatseal that the app didn’t like. On the flip side I’ve found native packages to be broken more often than not, with .Deb files sometimes just not working and throwing an error or something. Package managers are better for sure but I’ve had dependency issues that I have never experienced with flatpak.
Good for you for not having any problems mate! I’m sure this invalidates the parent poster’s problems.
I guess mileage varies here because flatpaks have always just worked for me. I only use flatseal to revoke excessive permissions.
I don’t hate flatpaks, but flatpaks require more disk space than the same apps from traditional repositories, and they only support a handful of the most common default themes. Since I only ever use older and slower computers, my disk space is limited, and I like to rice my desktop, I personally avoid them. But your use-case may differ.
Still no proper way to mirror the thing and have it working offline / on internal networks. Great job self-hosters and sovereign citizens ;)
Offline/internal network installs can be handled with
flatpak create-usb
- https://docs.flatpak.org/en/latest/usb-drives.htmlOne can distribute flatpaks along with their dependencies on USB drives (or network shares, etc.) which is especially helpful in situations where Internet access is limited or non-existent.
Cache/mirroring would be great for those who need it.
Edit:
Thinking about it, I wonder if there’s enough “core features” with ‘create-usb’ that its just matter of scripting something together to intercept requests, auto-create-usb what’s being requested and then serve the package locally? If a whole mirror is required, it may be possible to iterate over all flathub packages and ‘create-usb’ the entire repo to have a local cache/mirror? Just thinking “out loud”.
Thinking about it, I wonder if there’s enough “core features” with ‘create-usb’ that its just matter of scripting something together to intercept requests, auto-create-usb what’s being requested and then serve the package locally?
The issue is that… there aren’t enough “core features”. It doesn’t even handle different architectures and their dependencies correctly. It wasn’t made to be mirrored, nor decentralized.
Apt for instance was designed in a much better way, it becomes trivial to mirror the entire thing or parts and for the end tool it doesn’t even matter if the source is a server on the internet, a local machine, a flash drive or a local folder, all work the same.
Apt is a package manager. Flatpak is an app format that happens to have a package manager. It isn’t designed to manage a OS.
You absolutely can as Flatpak can run completely local. You can create a custom repo if you want.
Did you ever try doing that with public packages?
You can but I wouldn’t
It’s a fun exercise for you to see how convoluted and problematic it becomes.
Flatpaks are not centralized, Flathub is. You can have your own repo.
Yeah sure, just try to mirror Flathub into your repo.
I don’t get it. Why would you store all of it? I mean, you can but… why?
Because…
- Universities might want to locally host a mirror in order to waste less bandwidth and provide faster downloads;
- Large companies usually like to host internal mirrors for the same reasons as above and also so they can audit and pick what packages will be available for their end users;
- Flathub is slow af for some people;
- Local country-specific mirrors are always faster;
- In some countries not everyone can access the official flathub;
- One might be dealing with airgapped networks and systems for sensitive work and you want to have ways for your end users to install flatpaks;
- Fastly, their CDN might go down at any point (like Cloudflare sometimes does) and you’ll end up with nothing;
- Flathub itself may be subject to a cyberattack and their service might get crippled for a days or weeks and you’ll have nothing as well;
For what’s worth Debian archive repositories are about 5 TB and people actively mirror then in universities, companies, cloud providers etc.
The question here isn’t “why would you” but rather “why would I be unable to do it”. Their actively gatekeeping their repository in a futile attempt to be the single and central point of flatpak distribution - much like what Apple does with the App Store.
You can but there would be little point. Fedora has its own repo for instance.
Great opportunity to inject malware to so many vulnerable peeps then
You could say that with any program distribution. At least flatpaks are containerised.
Nah. Most distro package managers verify their packages authenticity with cryptography since the early noughts
It is noteworthy that builds of Chrome, VLC, Dolphin, Steam and Spotify are created by third-party enthusiasts not associated with the main projects.
What great news, that’s why there is no trust in Flathub.
I mean it is still miles ahead of snaps and the snap store
Why don’t you open an feature request on their git if you have an issue with volunteer work.
It’s funny thinking this guy uses a distro package manager potentially with unofficial patches applied to the package.
nice
Funny how it isn’t popular in countries with population several times larger than the USA. I guess every outside of the US can see through the bullshit of corporate-hijacked open-source.
Or maybe the two countries with a larger population than the United States have significantly lower per capita income and so fewer people own desktop/laptop computers. Most of the world probably has, at most, a smartphone.
If anything, Brazil seems like the outlier on the that map. You’d expect the U.S. to have the most computers. But Brazil and China are roughly similar in terms of income.
Wrong, India and China has the highest number of engineering grads. From NSF:
India awarded 2.5 million S&E first university degrees in 2020, followed by China (2.0 million) and then by the United States (900,000).
With a younger population that is more than ever, a need for laptop would be in the highest demands. In fact, if you check the desktop market share for Linux in India, it is the highest, at around 14%.
China blocked Flathub
average lemmy.ml mf
And your point being?
Could you elaborate?
Please check this comment.
Narrator: “But no, they could not elaborate.”
the bullshit of corporate-hijacked open-source.
???
I’ve written about this here already.
deleted by creator
Do you maybe mean snap?
Snaps are a default no, obviously. Most of the points by Flatkill still hold true to this day. Apart from that, I have my own set of disagreements which I’ll not be talking about - basically, stuff like reproducibility, storage space, inconsistent permissions, inconvenient configurations, outdated runtime - well, you get the point, so I’ll not be expanding on that.
My primary disillusionment towards Flatpak has to do with how people with shared backgrounds and vested corporate interests have taken over open-source - in this particular case, I am talking about Big Tech. It’s almost as if the space for a community-developed organization is hijacked by them - by them occupying core positions of the organization.
These organizations do not follow a horizontal approach to decision-making, they often come up with decisions without consulting folks that aren’t within their direct circle, and worst, when they’re held in a tight-spot, they can evade any criticism by appealing to authority - that they’re the maintainers/contributors, and they know what’s best for the project’s future.
The same is true about funding - it is always through members of the company that they’re indirectly funding these projects, that I can’t help but feel that the “community”, aka the outsiders never had the chance to be a part of the decision-making.
Flatpak may have it’s share of poor features that can be fixed - sand-boxing can be improved by using permissive containers that allow particular shell variables, installation will throw dialogue, informing the users beforehand about the permissions these apps will need, developers may be forced to use proper run-times, and perhaps, some of the runtime be eliminated to use system dependencies, thereby complying with storage compliance - I don’t know, but it could be fixed. But this invisible, unspoken flaw in the governance? No way.
You’re complaining about corporate fundings. Without them, a lot of open source tech would definitely not be as advanced as it is today. Since everything’s open source, anyone can just fork a project when some “malicious megacorp” “hijacks” the project. Funny how a similar case happened “the good way” recently with Redis/Valkey, but the other way around.
There’s always some doomers only seeing potential bad futures in awesome stuff, huh?
Oh sorry, I should’ve mentioned why I hate RedHat. Well, I used to like it. Like is an understatement, I used to love them. Because I was one of those college grads who wanted to take part in RedHat’s Tev-Aviv program for the open-source AI and software stuff. I was so thankful and enthusiastic about contributing to Linux. And even though I was not selected, I would embrace their products, and related OSS projects - I ditched Ubuntu, and stayed with Fedora for almost four years, before I had a change of heart last September.
How US Big Tech supports Israel’s AI-powered genocide and apartheid
IBM’s Role in the Holocaust – What the New Documents Reveal
Genocide profiteer IBM wins big on EU funding
A Marriage Made in Hell: An Introduction to Microsoft’s Complicity in Apartheid and Genocide
I didn’t want to go on a political rant, but here we are. The world ain’t single-dimensional, chief. It is the culmination of every factor that makes me hate Fedora, Flatpak, systemd - am I forgetting something else? I hope not. Not every opposition to corporate support of open-source is some unhinged boomer rant about the good ol’ days of X11 and POSIX-compliant shell - well, I’m a Gen-Z kid, to begin with. I couldn’t give a rat’s ass about the advancement of open-source, if the cost is supporting another corporation responsible for the Holocaust, Nakba and Apartheid. Those injustices and deaths were avoidable. As someone from a former colony, I can not, and will not tolerate enabler of these atrocities.
Well you do you. I don’t see the point in hating open source software made by them, you’re not paying them unlike with regular products and boycotting them.
It could also he that those people aren’t using computers with Linux
With the largest group of people graduating with an engineering degree, you’re telling me they don’t use Linux? Just check the stats at NSF for the number of degrees awarded in S&E.
India alone has 14% in the desktop market share for Linux. China’s market share is not easy to tell, thanks to the firewall, but 90% of government computers use Kylin and other Chinese-developed distros.
MVP
Flatpak’s usecase for me is Alpine Linux and other distributions that use musl or other libc implementations. I don’t love it, I think its cli interface and the way you add flatpak servers to be obtuse and annoying, but it is useful for getting glibc dependent software.
Another alternative is distrobox and bedrock linux.
I’d prefer to see downloads per country per capita.
Right? “Oh look, country with huge population has more downloads than country with small population!”
As a professor I have to say… the site admin skipped the class that taught them to include always the color bar.
FOSS keeps winning it’s Insane!
i hope it does 20 billion
Brazil has so many downloads
Lol, what a pointless map.
It’s impossible to tell at a glance which countries have more or less downloads, other than a couple of countries with a slightly lighter colour.Yeah, they could have applied a logarithm or something.
And included a legend, such as a colour bar
Also, no novelty - strong reject, no revision possible 🙂↔️
Such a Rev2!
What do you mean?