this post was submitted on 22 Jun 2024
600 points (97.8% liked)

Linux

48214 readers
1071 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 8 points 4 months ago (3 children)

Still no proper way to mirror the thing and have it working offline / on internal networks. Great job self-hosters and sovereign citizens ;)

[–] [email protected] 12 points 4 months ago* (last edited 4 months ago) (1 children)

Offline/internal network installs can be handled with flatpak create-usb - https://docs.flatpak.org/en/latest/usb-drives.html

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

[–] [email protected] 3 points 4 months ago (1 children)

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.

[–] [email protected] -5 points 4 months ago

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.

[–] [email protected] 3 points 4 months ago (1 children)

Flatpaks are not centralized, Flathub is. You can have your own repo.

[–] [email protected] 2 points 4 months ago (2 children)

Yeah sure, just try to mirror Flathub into your repo.

[–] [email protected] 4 points 4 months ago* (last edited 4 months ago) (1 children)

I don't get it. Why would you store all of it? I mean, you can but... why?

[–] [email protected] 6 points 4 months ago* (last edited 4 months ago)

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.

[–] [email protected] 1 points 4 months ago* (last edited 4 months ago)

You can but there would be little point. Fedora has its own repo for instance.

[–] [email protected] -1 points 4 months ago (1 children)

You absolutely can as Flatpak can run completely local. You can create a custom repo if you want.

[–] [email protected] 2 points 4 months ago (1 children)

Did you ever try doing that with public packages?

[–] [email protected] 1 points 4 months ago (1 children)
[–] [email protected] 1 points 4 months ago

It's a fun exercise for you to see how convoluted and problematic it becomes.