by zokier · 4y ago · 0 comments
Additionally, essentially vendoring full dependency trees for each application separately would massively increase the maintenance burden because instead of just maintaining one version of a library the distro will need to maintain n versions
> Modern applications are inherently fragile.
There is nothing inherent in the fragility, it is self-inflicted problem of some applications.
I think there lies deeper, cultural division between developers, who think the world (at least the computer) revolves around their app and their downstream, who desperately try to avoid more and more code shipped unto them for the upstream's convenience. It's not really a difference for upstream if they bundle a dependency or not (or 10k+, in the case of npm), but it quickly becomes a big support burden if you have multiple such "apps" installed.
It is choice between a system with bleeding edge / ancient(or sometimes insecure) program mixed together or a system with well audited recent enough programs.
Windows/Snaps go for the first, and apt/yum..etc chose the later. It's just all about it.
But only because distributions want to take control of everything. If a distribution just provided the necessary infrastructure to empower developers to maintain their own dependencies (like eg. Flatpak does), we wouldn’t have this issue.
I'm not sure where that's coming from. Distros/packagers (should) rightly feel a responsibility for a packaged application's quality, security, interoperability.
> If a distribution just provided the necessary infrastructure to empower developers to maintain their own dependencies
To stick with the Arch Linux example in the article, is the flatpak you get from `# pacman -S flatpak` not suitable for some reason?
This seems like false advertising. Ensuring an application is secure would require reading it's source. Based on maintainer complaints (like when that python package added a rust dependency) they don't seem to have the resources to even read all the changelogs.
Moreover, why shouldn't we empower libraries' developers to push their versions as they want? They also have limited manpower and support capabilities.
Empowering users is also making it easy to install what they want or need to install, not just what a distribution decides to offer. To give an example, many people need Slack for work, but distributions don't offer it, because it is non-free.
This quickly becomes important when interests misalign, for example when developers want to push incompatible update to users and stop supporting previous version,
Why should a distributor decide what my interests are?
Also, this argument is kind of strange, if a developer is pushing an incompatible update or stops supporting a previous version, will the distribution continue to maintain the application? Not really. Usually, it just means that the application is frozen in time and you can only hope that security updates are applied. If the application happens to be (e.g.) in Ubuntu Universe, you are usually out of luck and you just get to keep a bunch of applications with known vulnerabilities.
This misses entirety of what distributions are. Distribution is a collection of software packages that in tandem create uniform coherent unit. They only want to control what they distribute.
As I have mentioned in another comment, one of the core problems is that we do not understand our dependency trees. If you use version "latest" (or even do not audit your dependency trees not to contain such meta-versions) you consciously relinquish control of dependencies. At this point there is no real difference in power and control between trusting apt and npm not to break anything. Trusting npm (or pip, or whatever) is actually even worse, because they explicitly are just registries without any supervision or soft guarantees.
The architecture is fragile due to too many layers. Anything is "fragile" in the sense that you can't really design a really complex, generic system with all possible state pre-computed and handled up front, the point is how to handle the fragility.
Classic systems was "the OS is a single application where anything is ready available source code", this was utterly fragile in potential faults BUT far easier to correct any error so in the end far more robust. Think about some CL systems: you'll easily get far more issues in normal usage, but essentially any issue is easy to handle.
The real underneath issue is business: software can't be a commercial product, must be a common open knowledge, like a kitchen recipe, where any party involved can see and act and anything is designed ONLY for the human. We need desktops in a network not dummy terminals of a central service designed to serve their owner.
Kitchen recipes rarely need features added or even bugs fixed. But when this happens, it's usually done by a cook on the spot.
This is only possible due to utter simplicity of a typical recipe, compared to any substantial piece of software. Also, small variations in cooking usually result in pretty edible dishes, while small variations in a program can have drastic results.
So no, sadly, software already cannot be like a cookbook.
It's not the distro's job to ensure the application is secure and up to date, its up to the application packager (i.e. docker container maintainer) to do that. i.e. to rev new releases of the application image even if nothing has changed in the core app, just to take care of security updates in distro provided packages). In pr
I would prefer a distro that ensures applications in its repository are up to date.
Consider a log4j-type issue. In one case, the distro quickly fixes the vulnerability in a library package, the user installs the update and that is that.
In the other case, the user has to track down which installed applications use the affected library, update them if there is an update available, and figure out what to do if there is no update available.
I hear what you’re saying. But - I’ve been writing a lot of rust lately. For better and worse, most rust programs pull in dozens of crates as direct or transitive dependencies. Apt isn’t up to the task of replacing cargo:
- Apt’s dynamic library mechanism is designed around C’s dynamic library support. This doesn’t work with many other languages. It certainly doesn’t work with rust, which doesn’t have an ABI.
- There are too many rust packages, and they update too frequently for apt to keep up. Apt could be a bad, out of date, partial clone of cargo. But that sounds worse than cargo in every way.
- Shipping deps with cargo (or whatever) is preferred by app developers because cargo is better integrated with the language. And it works reliably on every platform. A dpkg wouldn’t even work on every version of Debian.
We have a similar problem with ruby gems, nodejs packages (in npm), etc etc. I could imagine apt wrapping cargo, npm, and friends and providing equivalent functionality. But the authors of apt seem to think it’s already good enough. It’s not. Cargo, npm, and friends run rings around apt from the point of view of developer mindshare, ease of use, platform independent packaging, and so on.
Apt and friends don’t have the features we want, and all the browbeating in the world won’t change that.
https://wiki.debian.org/StaticLinking#Rust https://github.com/rust-lang/rfcs/pull/2603 https://github.com/rust-lang/rust/issues/60705
That sounds like a pretty large downside to using Rust.
Nothing's stopping them from shipping them as static libraries - with some simple tooling it's easy enough to figure out what needs rebuilds and automate it.
> There are too many rust packages, and they update too frequently for apt to keep up.
And what do you think cargo does to keep up? It uses a metadata system and a common build system across packages to make automatic discovery of dependency trees seamless. There's nothing stopping a debian maintainer from writing automatic tooling around this, in fact, it already exists[1].
> A dpkg wouldn’t even work on every version of Debian.
And neither does cargo as soon as there's a crate that requires a too new version of openssl or whatever other C library. The reality of the matter is that cargo can't express the full dependency tree including any cross-language or system-level dependencies.
> We have a similar problem with ruby gems, nodejs packages (in npm), etc etc.
I can name a few problems that make nodejs slightly different, and it's the fact that npm doesn't deal with source packages the way cargo does, it deals with binary packages that can include whatever flavor of bundled shared libraries du jour, probably only built for x86_64 and if you're lucky arm64, and with unclear source and/or build instructions or OS compatibility. Its build system also has support for defining custom build procedures and calling random binaries during build like the npm package for 7zip, which is also prebuilt. This, and the tendency to make microdependencies just doesn't mesh well with distributions that need to make sure everything has corresponding source and can be built reproducibly.
Ruby gems have been solved since they've been around for longer, as have python packages, even though the latter keeps introducing wrenches to make packaging harder.
> Cargo, npm, and friends run rings around apt from the point of view of developer mindshare, ease of use, platform independent packaging, and so on.
Maybe, but they introduce their fair share of problems as well. I've already mentioned the piss poor support for cross-language dependencies, but let's mention that the "stores" the packages for these are published to are only moderated after the fact - it's really easy to introduce malware into these stores without anyone noticing, and it's happened a bunch of times. Distributions make sure the binaries correspond to the sources[2], and the maintainers are the first to spot any obvious malware or breakage in software as a result of a change. Sometimes it goes under their noses as well[3], but these cases are much more rare than npm breakage. In general, the distribution model allows for better trust and security, and I think this is something that should be valued more than it currently is.
[1]: https://salsa.debian.org/rust-team/debcargo/
[2]: https://reproducible-builds.org/
[3]: https://www.theregister.com/2015/06/17/debian_chromium_hubbu...
1) fix the bug in the vulnerable package (cut a new version)
2) make sure the new, bug-free version is actually in use
1 is the responsibility of upstream (though sometimes distros will do this too, and release it themselves while they try to upstream the patch).
2 has to be done by somebody for every application using the vulnerable package, either a) automatically (for example, by Debian releasing the new log4j version and all dependent applications picking it up at runtime) or b) individually (by each dependent project's upstream updating the dependency, cutting a new Flatpak or container image, and getting users to update it).
a is much more pleasant than b, at least in the universe as currently constituted. We can imagine a world where b is mostly automated so it is about the same or less work, but we don't live in that world yet.
On the contrary, it's the most important feature of distributions.
I'm not talking applications provided by the distribution, those aren't "applications" (i.e. in my usage, something installed onto an existent operating system), but part of the provided operating system itself, and yes, I'd agree it's their job to keep their provided operating system secure. It's not their job to keep external apps secure (but to provide the means for whoever is maintaining those apps to keep them secure).
...
It sure seems distro inflicted to me. The architecture induces fragility. Apps needing to very carefully step to avoid breaking things is the definition of fragile.
The maintenance burden for who? Using isolated apps (Assuming that no-shared-libraries is what we want, which is probably true for desktop systems like and less true for security critical systems or "traditional" linux systems) just places the maintenance burden on the apps where it belongs. Yes, unmaintained apps should run out-of-date libraries.
That's certainly not what I want on any system, desktop or otherwise.