this post was submitted on 06 Mar 2024
397 points (95.6% liked)

linuxmemes

21263 readers
506 users here now

Hint: :q!


Sister communities:


Community rules (click to expand)

1. Follow the site-wide rules

2. Be civil
  • Understand the difference between a joke and an insult.
  • Do not harrass or attack members of the community for any reason.
  • Leave remarks of "peasantry" to the PCMR community. If you dislike an OS/service/application, attack the thing you dislike, not the individuals who use it. Some people may not have a choice.
  • Bigotry will not be tolerated.
  • These rules are somewhat loosened when the subject is a public figure. Still, do not attack their person or incite harrassment.
  • 3. Post Linux-related content
  • Including Unix and BSD.
  • Non-Linux content is acceptable as long as it makes a reference to Linux. For example, the poorly made mockery of sudo in Windows.
  • No porn. Even if you watch it on a Linux machine.
  • 4. No recent reposts
  • Everybody uses Arch btw, can't quit Vim, and wants to interject for a moment. You can stop now.

  • Please report posts and comments that break these rules!

    founded 1 year ago
    MODERATORS
     

    Background-Story: I did a "flatpak update" on a remote client and every package wants the PW for downloading and for installing again. I had to enter the password like 30 times or more.

    you are viewing a single comment's thread
    view the rest of the comments
    [–] [email protected] 32 points 8 months ago (2 children)

    Nah, it's pretty popular. Flatpack for the things you can't / won't use your regular package manager is the most common behavior.

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

    I dunno. A lot of stuff is switching over to flatpak these days. And it is the right direction. Regular repo stuff for the system and flatpak for apps is the way to go. You can have solid base separate from the applications.

    [–] [email protected] 6 points 8 months ago (1 children)
    [–] [email protected] 5 points 8 months ago (1 children)

    It's good that there's options for everyone. I feel like flatpak is to desktop systems what docker is to servers.

    The situation right now is good in that both are maintained, but in the future it might be that distro repos get slimmer while flatpak becomes the norm. But we'll see. I bet there's people out there willing to maintain packages in the distro repos if nothing else then out of spite hah.

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

    I think there are some quite difficult technical challenges to solve with flatpacks that prevent its wholesale adoption. I'm sure they'll find a way, but it'll take some time. In the meantime, I'll rest on apt.

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

    I don't know, I think it's really far already. I can't think of any big issues I've had. Biggest technical issue is KeepassXC talking to Firefox, if both are in flatpaks. But that has a working workaround and the issue is being worked on right now (I had a ton of emails since I seem to be following the issue on github lol).

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

    That is a big one, inter process messaging securely.

    The other one is memory deduplication. Uncontainerized libraries get code stored in memory once. When two applications use the same library, only library variables are duplicated, executable code is stored once.

    When two flatpacks package the same library, they duplicate memory use. This is has to be addressed if we're thinking of replacing regular packages altogether.

    Ok, suppose we got over that technical jump and can share code memory among different flatpacks. What happens when one of them is updated and packs a newer version of the library? Can we use the newer version for both? Are we breaking compartmentalization by doing so? Or by the very sharing of it?

    The concepts need to be worked out (a big hurdle), then implemented. At this point, are we departing too much for the concept that we're essentially creating just another package format?

    I don't have these answers, but I think there's a good chance the answer to those will limit flatpack (and competitors) application as the end-all, be-all package format.

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

    Inter process messaging seems to be have quite some attention right now. I don't think it's very far now, if KeepassXC/Firefox issue I'm following is any indication.

    When two flatpacks package the same library, they duplicate memory use.

    Maybe I misunderstood you, but if they share the same library, the memory deduplication is already happening? I found this https://github.com/flatpak/flatpak/issues/4997

    I've been running fairly low ram machines and I genuinely haven't noticed any difference. Maybe I haven't run enough of them at the same time and them having different (not shared) libraries. I wonder what the benchmarks are on this. I've only seen threads where people say it uses a bit more but no real comparison.

    end-all, be-all package format.

    I'm not sure if that's the direction. I think flatpak is specifically targeting GUI apps, with the "system" packages being traditional packages. And I think that's a good solution, that way you'd have a tighter system layer that could even be immutable and you'd have a separate application layer, so they don't mess with each other. Good for preventing breakage of the system if there's somehing fucky with some app.

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

    I think that deduplication ticket refers to library flatpacks. Like both flatpacks depend on a third one, and the contents of that third one will be loaded only once in memory.

    I was taking about libraries packaged together with two apps. I don't think the OS will know that two files located in different locations are actually the same and can be loaded only once in memory.

    If that is solved, I'd be really glad to hear. Especially the decisions involved in handling multiple versions.

    Whereas about how much of the system goes in flatpacks, once you've put your DE and apps on it, that's like 80% of a typical desktop software load. There's not much left and, like you said, the rest can be immutable. You may argue the DE is part of the base system, and I'd agree with you, but many people don't.

    Veering off topic for a bit... TBH it feels a little too much like Windows for my taste. When apps have a package maintainer, you can choose the level of stability you want and developers can focus on adding features / optimizing. When you remove that layer, the developers need to figure out how stable to keep their app to cater to most users, and if you are not comfortable with that, tough luck.

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

    They do talk about how the library deduplication in memory is an OS feature and nothing to do with flatpak so it's possible that the same library being shared might be dedupped whether it is in same runtime or not. But I don't know. In any case, I guess extra RAM use is possible but I don't think (from personal experience and reading up on it) that it's very noticeable. Not to mention a lot of the used libraries do come with the runtimes, so that alleviates the issue if the dedupping isn't happening.

    Whereas about how much of the system goes in flatpacks, once you've put your DE and apps on it, that's like 80% of a typical desktop software load. There's not much left and, like you said, the rest can be immutable. You may argue the DE is part of the base system, and I'd agree with you, but many people don't.

    I think the intention is to keep at least some parts of the DE outside of it, but the apps that make it as flatpaks. So for KDE I think it would be something like the shell, file indexer, "low level" stuff like that out and image viewer, media player, browser, "apps" like that in flatpaks. Which does break the DE up but makes sense to me, with "system" being separated from "apps".

    Veering off topic for a bit... TBH it feels a little too much like Windows for my taste. When apps have a package maintainer, you can choose the level of stability you want and developers can focus on adding features / optimizing. When you remove that layer, the developers need to figure out how stable to keep their app to cater to most users, and if you are not comfortable with that, tough luck.

    You could have "stable repos" for flatpaks, maintained by distros but I feel like it would take away some of the point of it (being to ease distro repo maintainer workload). Some devs will be happy that there's no "meddling" distro maintainers, which is a complaint I've sometimes seen from devs. I think the idea that the apps come straight from the devs is both good and bad. Good in that it's how the dev intended and updates are possible much quicker. Bad in that often the modification distros do serve a good purpose, of making the app better fit in to the whole or fixing stuff that misbehabes but for whatever reason hasn't been fixed upstream.

    [–] [email protected] 2 points 8 months ago

    Nothing further to add, I'd just like to thank you for the engaging discussion. Have a good one!

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

    And it is the right direction.

    I disagree. There's already a universal format for deploying software on all Linux distros. It's called "source code".

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

    Well there's always Gentoo for those who want that, I suppose.

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

    Or Arch. Or Slackware. Or OpenSUSE. Or basically any general purpose distro that isn't Debian-based.

    [–] [email protected] 2 points 8 months ago

    I meant more geared for source from the get-go. Compiling everything from source without package manager or something, old school style might be a bit of a pain for most users.

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

    Noob question: lately I've been using flatpaks for most things because of the packaged dependencies. I am under the impression that as you add and remove programs over time, you'll run into less issues with flatpak than with the distro package manager because the dependencies will come and go with the flatpaks and not sit in the host accumulating my mistakes. Am I wrong about this?

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

    Any package manager worth its CPU cycles should take care of orphaned dependencies for you. Whether your package manager is decent or not is matter of heated debate, but the problem of orphaned dependencies has been largely solved.

    TLDR, you're likely wrong about it. You're also paying to have a neat filesystem by using more storage (which is cheap, spend away), memory (a bit or a big bit, depending), and performance (there are comparisons online, only you can decide if it's significant for you).

    Now, my opinion is that you're overtaxing yourself. The reason you mentioned for adopting flatpack is better addressed by familiarizing yourself with your main package manager. People that defend widespread use of flatpacks usually have other reasons (mostly newer versions, faster bug fixes and security fixes, etc.).

    The combination of which distribution and how to use side-loaded software isn't a one size fits all. There are pros and cons to each approach, and they differ based on your needs, your distro, your threats...

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

    Thanks for answering! I'll do some reading on how package managers work.

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

    Good luck. That's like "reading on how software works".