by superkuh · 3y ago · 0 comments
As for which container, it doesn't really matter, and there's been a lot of not-invented here going around creating new containers that muddied the waters. But the truth is they're all symptoms of something bad even if they mitigate a problem temporarily (while making debugging, networking, freedesktop standards, etc incomparably harder).
--
Flatpak is awful, i tried installing software from it a few times and not only it always installs a ton of unnecessary stuff (practically an entire distro!) but also the software doesn't integrate seamlessly with the rest of the system. GUI software looks wrong (themes do not apply, font rendering is wrong), command line software doesn't show up in PATH. Example in [0] for the GUI bits (Bless for theme, Notepadqq for font rendering) as well as the disk usage for two simple programs like a hex editor and a text editor.
Even worse, while there is an option to install things in the user's directory only (so i can make a separate user to try some things that i can easily delete later) not everything installs with that options and wants root access to pollute the rest of my system.
Nowadays i simply avoid anything related to flatpak. If something doesn't provide normal binaries and i really want it, i'd rather compile it from source (and if the source language is something exotic or the program needs a ton of dependencies i'd just skip it).
Command line software does show up in CLI, just not by its short name. You have to use the fully qualified app name - com.xyz.whatever. You can make an alias if you want.
> Even worse, while there is an option to install things in the user's directory only (so i can make a separate user to try some things that i can easily delete later) not everything installs with that options and wants root access to pollute the rest of my system.
Are you talking about flatpak install --user ? Yes youre right some apps might not work with it but how is that any worse than traditional packaging.
Flatpak isn't perfect and I prefer distro packaging over everything else but it isn't feasable to have distro packaging for everything - not with the strict packaging rules most distros have atleast.
But out of snap, appimage and flatpak I'd go with Flatpak.
Ultimately I want my software to be shipped by my OS's package manager like pacman, apt, nix, or flatpak etc. The fact that I can go ahead and install dependencies in pip, npm is an implementation detail while I'm working with the code. The entire linux ecosystem should have been designed in the first place like nix, AppImage or flatpak from day 0 and going to the "shared libraries" route was simply a bug. We thought it was ok, but we quickly saw it was not ok and we should have made the observation that it's not working and switched but we didn't. Like nix does, when there are common dependencies between apps you can still optimize and install them once, but each app should define its own dependency and that version alone should be allowed to use so that a library upgrade doesn't break anything.
Unfortunately, package management is an utter mess today and I no longer have any appetite to use things like `pacman` or `apt` unless absolutely necessary. And this is not even just the fault of archlinux or Debian. Case in point, MuseScore (an app I use every day to write music) published MuseScore 4 over MuseScore 3. The fact is, MS 4 is much better than MS 3, but some workflows are different and it's not in complete future parity with MS 3 (some things they decided not to implement). Now, I want to use MS 4 and I do use MS 4 for most things, but for certain things I still absolutely need MS 3. By "absolutely": I mean for some compositions MS 4 is a dealbreaker and MS 3 is the correct tool. But most other compositions MS 4 is the superior and correct tool. But when they published MS 4 pacman immediately made the package `musescore` point MS 4 with no option to install MS 3. They're two entirely different apps. Solution? Just download the .AppImage from website and call it a day. It would have been much better if `pacman` serves MS4.pacman_exe and I click on it and it opens MS4. Then, it also optionally serves MS3.pacman_exe, I click on it and that also works. If I desire I click on MS3.6.2.alpha43432.pacman_exe and use that specific version, with every library fixed. But this is currently impossible since each version can potentially need different dependencies etc so .AppImage is the only way.
Traditional distros are able to install the same apps side-by-side, such as python2 and python3, if they put their mind to it. It is just a bit clumsy. Sounds like they didn't allow for that with your app. That's a shame, I guess you could ask or cough up a donation to help?
I generally just wait for things to get packaged in the regular distro, but it is nice to have choices.
Its not an apt problem, its a problem that the application is fundamentally a new product that needs a unique name.
Flatpak feels like it took the wrong lessons from the past 30 years of software distribution and turned it into a platform. I get that it has to be simplified to be friendly to newer users, but it's also a complete turnoff when you want to fix an issue or edit a config file.
Why can't we just static link everything, and distribute binaries like we're on win32?
The big difference isn't static vs dynamic but that on Windows the DLLs that come with the OS do not break backwards compatibility so applications can rely on them whereas on Linux only a very tiny number of libraries do not break backwards compatibility (from the top of my head that'd be glibc[0], X11/Xlib/etc, curl and OpenGL). Most importantly the libraries for making a GUI application do tend to break backwards compatibility (see the breakage in Gtk1->Gtk2->Gtk3->Gtk4 and Qt1->Qt2->Qt3->Qt4->Qt5->Qt6 though with the latter being C++ they can't help it as C++ itself makes it harder with not having a stable ABI). Not all do (AFAIK Motif has been backwards compatible since the early 90s) but those that don't aren't that common (for unrelated reasons - e.g. most provide only a small fraction of the functionality Gtk/Qt provide or, in cases like Motif, the license was unpopular with FLOSS developers so no ecosystem was built around it).
[0] they do break compatibility for programs using unsupported APIs though
If you've got $$$$ of CAD software (or whatever) in binary form, which you know will work on pretty much every version of Windows but will absolutely not work on Linux or OS X - that's a good reason to stay on Windows. Microsoft is willing to do a bunch of compatibility testing etc to maintain that moat. They've got the money to pay developers to make sure Office 97 still runs on Windows 11.
Linux, on the other hand, has a lot of different stakeholders - and some of those stakeholders take the opinion that closed source software can go fuck itself. Maybe a Linux distribution wants to update from OpenSSL 1.1 to OpenSSL 3.0 and they're quite happy to patch all the software that's part of the distro. If you want to run some closed-source binary-only software from 1997 - that's between you and the software vendor, buddy.
It is sadly a very common misconception that backwards compatibility is only for close source software but in reality FLOSS benefit a ton from backwards compatibility too.
Imagine for example if glibc decided to add a third parameter to fopen (ignore if it is realistic for glibc to do that, this is for the sake of argument).
The only benefit of FLOSS[0] would be that it'd be easier for someone to update it to use the third parameter instead of waiting for the original developer to do so - but still every program, FLOSS or not, would need to be updated anyway and someone would need to spend time doing that update.
A more realistic example would be GIMP: the stable releases (last was made a few weeks ago) still rely on Gtk2 and the Gtk3 port (i.e. the effort to move from Gtk2 to Gtk3) is still in beta while the Gtk devs consider it deprecated. And this is all open source, no closed source software in sight, yet see how much time was lost (not only for GIMP but for any software that relied on Gtk2 and had to switch to Gtk3, with the story repeating for Gtk4) - time that could have spent improving the actual functionality that the GIMP users use the program for - adding functionality for manipulating images - instead of using yet another approach to draw and lay out buttons, menus and checkboxes - something that was already solved back in Gtk 1.x days.
[0] actually of any source available that doesn't have a "see but don't touch" rule
Because what happens if there's vulnerability in say zlib or openssl. As a distributor you'd need to rebuild everything (volunteer-run distros don't have sufficient cpu time to rebuild the whole archive at once), and in the process check if the update won't break anything in each and every package. Or rely on upstream (which may be unresponsive, because they're also volunteers).
This might be manageable in relatively small, single-language, corporate-backed apps, but is not viable in volunteer-run operating systems with ~50k packages written in every single programming language invented.
No one distro will risk this (imagine Phoronix article: "After 1 year, CVE-2023-123456 fixed in only 30% of packages in StaticLinux!").
I mean, you're free to try. I'll provide time-to-fixed statistics for all your CVEs.
Flatpack Runtimes do this for common dependency lists, but still allow some customization, without me having to recompile openssl- or some other annoying upstream.
Maintaining backwards and forwards compatibility will cripple you as a lib developer. If you do it, your solution will be slower to change, and probably slower overall than a solution that breaks compatibility occasionally.
So you get less contribution and small bus factor means this library is more likely to die.
In addition, even in the case the applications stop getting developed, they will keep working since their dependencies would not break and other developers can pick them up if needed, even years later. On the other hand having to pick up a project whose dependencies do not even work anymore is much harder.
In theory, yes. In practice due to Hyrum's law you'll have to reproduce bugged behavior because an application exploited a bug in your code. See for example SimCity Windows 95 compatibility story.
https://arstechnica.com/gadgets/2022/10/windows-95-went-the-...
Now Microsoft could afford to buy and test a wide combination of hardware and applications to ensure future compatiblity.
I don't have first hand experience with nix, but if I would look at this statement from Guix point of view (and I assume nix will be same/very similar), this is not really true.
Nothing prevents you from having a list of libraries (in a manifest). That list might be way to wide for any specific program and it can represent what you would normally have as "system libraries".
You can then just invoke shell as guix shell --manifest=manifest.scm and you will be given working shell with all the libraries available.
You can also just package your program using trivial copy&paste code with the same list. Sure, the dependencies will be too wide, but since you are not sending the package to upstream Guix for inclusion, no one really cares.
So, is it as friction-less as "normal" distro? No (especially the "add to /bin" part).
Is it as bad as "manually create and specify the entire "system" libraries set bit by bit every time"? Also no.
NixOS deliberately avoids having global/implicit 'system' libraries / configured state, and instead demands declarative expression of the system configuration. -- The libraries the system uses don't adhere to a global FHS structure.
Nix similarly eschews use of global/implicit libraries. Building each package requires its dependencies be declared.
However, it's incorrect to say this is "just containers". I don't see how you get "abandonment of concept of desktop distro" from "doesn't have implicit system libraries". -- NixOS allowing the whole system configuration starting from a single file is convenient, and something people might otherwise use a tool like Ansible for.
That said, NixOS obviously has many use cases which have significantly higher friction compared to more typical systems. (And a steep learning curve to overcome that friction). -- e.g. on Arch or Ubuntu, the system configuration is global and malleable.
Nix is the actual and only novel solution in this space — you can just have a single flake file in your repository to make it always reproducible. It will only build/download files that are necessary, using a minimum required space.
But for this reason it can also just point you to a binary cache and you can copy the necessary data (basically just a diff of what is required dependency for running program P and your system). Just because the source is not available doesn’t mean that the dependencies can’t be explicitly specified and use some standard deps. Chances are that proprietary app will just depend on a libc you already have downloaded.