• TCB13@lemmy.world
    link
    fedilink
    English
    arrow-up
    16
    arrow-down
    8
    ·
    4 months ago

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

    • ᗪᗩᗰᑎ@lemmy.ml
      link
      fedilink
      English
      arrow-up
      14
      arrow-down
      2
      ·
      edit-2
      4 months ago

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

      • TCB13@lemmy.world
        link
        fedilink
        English
        arrow-up
        4
        arrow-down
        1
        ·
        4 months ago

        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.

        • Possibly linux@lemmy.zip
          link
          fedilink
          English
          arrow-up
          1
          arrow-down
          6
          ·
          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.

          • TCB13@lemmy.world
            link
            fedilink
            English
            arrow-up
            6
            ·
            edit-2
            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.

    • Possibly linux@lemmy.zip
      link
      fedilink
      English
      arrow-up
      2
      arrow-down
      3
      ·
      4 months ago

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