4 ms·
We did something like this 20 years ago at a company I worked for. It's effectively pointless, and there are better, more modern methods. Here's why. First of
by 0xbadcafebee 6y ago
We did something like this 20 years ago at a company I worked for. It's effectively pointless, and there are better, more modern methods. Here's why.
First of all, the filesystem isn't a database, it's a hierarchical index of files. It has a couple fancy features specific to managing files. Trying to force it to do more than that will result in pain, and eventually building something else around it. But the filesystem isn't even the biggest limiting factor.
Managing both the build-time and run-time dependencies of software is more complex than a filesystem can handle. To execute an application in an operating system, there must be one "environment", which is a combination of a kernel, an OS's environment and resources, and a set of applications and dependencies. The dependencies are set at build time and run time, and can't be interchanged at will without causing instability (if it works at all). You can juggle symlinks around all you want, but it doesn't result in any useful functionality other than looking at a bunch of differently versioned files that are not - cannot - be in use.
The applications themselves can be programmed to interact with multiple versions of dependencies, but if they are not already built to do so, you cannot force them to. This underlying limitation is what forces an application environment to depend on a static tree of files. It doesn't matter how many versions of a dependency you have installed, you can only use one at a time, as each application allows you to. That's why you can only install one version of a package, and why we don't have trees of versioned file hierarchies for the dependencies. They'd be pointless. You can only use the files you can use.
All popular Linux distributions today know this. They have worked along with the Linux Filesystem Hierarchy Standard over the past 26 years, and understand these issues well. Distros may implement it differently, but mostly they conform to it, because they know nothing else really makes a difference. At the end of the day, the current standard (when properly used) is as simple and effective as we can get.
Some software developers (cough Systemd cough) basically don't give a shit about the standard, and generally make the users' and distros' lives harder. This is the one place where the distros could make a difference, by forcing a structure that makes more sense. But enforcement is haphazard, so some apps can force really stupid file structures on distros, and people wonder why the filesystem is so confusing.
So you may ask, what's a better solution? The answer is containers (or really, chroot environments, but that's what a container is). I have a longer post which goes into more detail about why package management literally cannot solve any other problem than it already does, and why containers are the only "advancement" without radically redefining application development: https://gist.github.com/peterwwillis/e96854532f471c739983c0bba7608834 https://gist.github.com/peterwwillis/e96854532f471c739983c0b...
- ahnick 6y agoBased on your experience then, do you feel something like Fedora Silverblue will ultimately be more successful than a NixOS approach?
- SulfurHexaFluri 6y agoI think silverblue will take off because it seems a lot simpler to use. I haven't tried out either yet but it looks like silverblue simply asks you to use flatpak instead of dnf while nix requires you to learn a complex config programming language.
- 0xbadcafebee 6y agoI mean, both are going to die eventually. But Nix will be more "successful" because its niche will keep die-hards around a lot longer to maintain it. Silverblue will be abandoned much earlier due to lack of interest in maintainership when they realize it's so complex that most people won't want to deal with it. As a comparison: Slackware is still around. It hasn't had a stable release in 5 years, but it's in active development (the latest sudo 0-day was patched the day it was reported; how's that for long-term support?). Is that "successful"? I dunno, but I'll bet Nix ends up the same way, because it's run for and by 'server people'. Nix's approach is more for server people, and Fedora's is more for desktop people. But both are unnecessarily complicated and don't provide any significant benefit over a traditional distro's packaging for the average user. Regular-old packaging is "good enough" for 99.95% of use cases, and that which has problems is usually just crap software that's hard to make work in any situation. Linux has always been, and will always be, a toy rather than a practical tool. But for server administrators and embedded engineers (the drivers of its most common use cases) they'll never use either of those distros, because they aren't KISS. Regular-old package management and FHS isn't sexy, but it's very well understood and fairly easy to work with. Modern industry standard is to treat old-style distros and old-style packaging as cattle, but the above distros are pets. Though Android devs probably love the two distros. As a side note to all this: I tried a 12-year-old copy of a Linux Desktop on a 12-year-old machine the other day, I think it was Gnome 1 based. Everything on it blew the fuck away everything on my 2018 Linux laptop for speed. I was depressed the rest of the day. Not just because new software is bloated and buggy and slow as shit, but because I knew I couldn't use that old software on the modern web, and all applications are now web applications. No modern web browser will work on such an old machine, and you can't browse the web at all without a modern browser. So Flatpak on modern distros is supposed to fix this, right? Run any version of any app? But not if new Flatpaks, or the software inside of them, eventually change so much they won't run on old Flatpak-running systems. Or people just don't package their software in a Flatpak. And there is not a single guarantee in the entire project that they will keep compatibility for a long time, because Flatpak has nothing to do with future-proofness. So this is "the future of Apps on Linux": the same BS a new box. Additional aside: Why the fuck is Android 10's "system files" taking up 19 fucking gigabytes on my phone? What the fuck is in there, the fucking Library of Congress? An 8K video of Linus Torvalds giving me the finger?