A Peek into the Future of Distros
venam.nixers.net
venam.nixers.net
Meanwhile, the distro packaging process isn't keeping up with packaging all interesting FOSS out there, e.g. it has more or less completely dropped the ball on integrating with the many language-specific package managers out there like cargo, npm, pypi. And also it seems processes and workflows are stuck in the 1990'ies further preventing progress (e.g. https://michael.stapelberg.ch/posts/2019-03-10-debian-windin... ). Ironically people run more up to date FOSS on windows or macOS than on Linux, where you're stuck with the schedule of your distro. There's also the irony that some FOSS apps fund themselves by providing builds for money on the commercial app stores, but they have no way to similarly monetize Linux users (e.g. Krita).
So some kind of base system + app store where the app developers can push sandboxed stuff with some automated or human curating like the mobile app stores around now looks like a reasonable model. I guess this is what flatpack and snaps are aiming for. Also, where should the line be drawn between the base and the app store apps? Presumably we don't want coreutils to come packaged as a container, but I don't have a clear answer to where the line should be.
Nothing should come packaged as a container. The home OS should containerize all externally obtained binaries, assigning limited resources to them, as chosen by the user. The package distributors do not get to decide what level of access do they need; from their point of view, all resources are available; but the user must be able to add limits from the other side, unbeknownst to the (potentially hostile) package distributor.
The problem is that the user can't be expected to know which resources an app needs ("Hey, this thing wants to access /usr/lib/x86_64-linux-gnu/libc.so, sounds suspicious, let's deny it"), but OTOH you're fully correct that the user must have the choice to deny specific access, perhaps by giving the app fake or empty data. So I think both are needed, so honest app developers can specify a minimum set of permissions the app needs to work to reduce the havoc a programming error in the app can create, but also giving the user opportunity to limit what the app can see (the user presumably want a word processor to be able to read and write a document the user is working on at the moment, but not everything in the users home directory).
My point is that the security must not be enforced by the package distributors. This is what happens when they ship containers, as snap and the like, and it is a disgustingly wrong policy. Security must be enforced by the OS, under the total control of the user, and with reasonable defaults.
Same with drag and drop. Data could be put into a folder in /tmp, a mount could be set up whilst it uploads your photo or whatever to Facebook, and then the mount and the temporary dir could be deleted.
Having a "shadow fs" displayed to the container so it can function as if it is not in a container, but then when it wants to access the actual fs, it is done via either prebaked whitelist or user interaction/confirmation, would be great because apps would not have to be modified and security would be incredible.
You could even have it write to shadow FS and that could be synced later.
For base system utilities we already have sandboxing solutions. Either apparmor or selinux can do it quite well. Apparmor doesn't come with quite the number of profiles yet, but I see that my system has specific selinux labels on chsh, dmesg, hostname, and other common binaries.
Please stop confusing the two things. Sandboxing is about security.
Containers are mainly modern chroots.
> And also it seems processes and workflows are stuck in the 1990'ies further preventing progress
Quite the opposite, especially in Debian. The distribution has been driving a lot of innovative projects including reproducible builds.
> So some kind of base system + app store
A curated archive of software, reviewed by trusted packagers and thoroughly tested by a large number of users? It's called APT and existed a decades before "app stores"
> where the app developers can push sandboxed stuff
No thanks, I'll never trust upstream developers to sandbox their own stuff. Too many times I run into upstream developers thinking that the end user system is their playground.
After using Linux for about twenty years now, I'd be very surprised if a stable -- let alone solid -- framework were indeed what this leads to :-D.
Edit: FWIW, I, too, think this is where Linux is heading, more or less. I don't have secret insider info -- this is just where the money and, thus, where most active development and commercial support is. I don't think it's a bad thing in terms of overall idea or architecture, but the implementation fills me with dread and horror :-).
If anything it will reduce the security nightmare.
It's not just a matter of technical difficulty, but also a problem of getting users on board: lots of them look at Flathub and -- quite understandably -- wonder why you'd want to jump through fifty sandboxing hoops to sandbox applications like Gimp and VLC, whose developers they trust and for which they get sandboxed packages out of their distributions' repos. The obvious retort that this isn't aimed at applications like Gimp and VLC feels a bit unsubstantiated because... what applications is it actually aimed at, then? Closed-source, potentially malicious applications like... what, if Linux had a lot of those, "the year of Linux on the desktop" wouldn't be a joke. And why not just run those in a virtual machine, which is likely to be a lot harder to escape from and also means you get to keep a "normal" *nix system as a host.
It's hard to get people on-board with sandboxing when most of them shrug and say they don't need it, and when -- if you squint a little -- it kindda turns out they're not entirely wrong, either.
> for which they get sandboxed packages out of their distributions' repos
s/sandboxed/signed)
Meltdown should have been the nail in the coffin for this philosophy.
To mitigate zero-day vulnerabilities in applications that parse external data (such as Gimp and VLC)? Trusting an application does not mean that it does not have vulnerabilities that can be exploited in the future.
So no curation, no security guarantees, no quality control. This will give you many more apps, but most of them will be garbage, just see the google play store as an example.
Is "size at any cost" actually a good goal?
Aside: how long until the GameStop "Downfall" parody?
I don't want to spend more than 30s to decide if I want to install an app or not. I definitely don't want to have to go on reddit for that...
Making sure the apps on the store are secure is not my job.
On a Mac:
* apps are shipped in self-contained bundles
* launchd inspired the design of systemd
* the base system is shipped as an immutable image in a APFS sealed volume, and there's a clear separation between the base system and the user's apps.
So Macs actually implement the vision outlined by this article. In the Linux land, Fedora Silverblue probably comes closest (although comparatively lacking in polish).
There's a significant number of non-power-users who appreciate more advanced things working out of the box, even if it means more resources when not using all the advenced things.
This feeling about D-bus is, I feel, not universally experienced.
> D-Bus has also been criticized as being bloated and over-engineered, though those claims are often unsubstantiated and only come from online rants. It remains that D-Bus is still heavily popular and that there’s no replacement that is a real contender.
However yes, dbus exists. It could be improved a lot but it does its job. There are some valid issues, but I also get the impression that a large number of people criticising it never actually tried to use it or understand what it does.
Things like network service discovery, possibly network configuration, screenshots, Bluetooth, IME, and many others use dbus these days.
Flatpak is sandboxed with clear APIs & portal which is absolutely necessary (even for FOSS app, for eg. if Firefox has a leak we'd be happy it can only access the download folder and not our photos, documents, home folder, etc.).
But Flatpak sucks so much for development. The runtimes idea are totally overkill and not granular. Using libraries, packages, IDEs and coding tools is horrible with Flatpak.
Just look at the wierdness of running VSCode(ium) in Flatpak. According to flatpak / red hat guys the dream setup is :
- Remove the sandbox of VSCode through flatpak-spawn escape permission (so there no point in using flatpak...)
- From there call & enter Toolbox/Podman and install your dependency there using yet another package manager (dnf)
So you loose sandboxing, use two separate container tool & use two separate packaging tools.
So overkill & overengineered.
Now take Guix. You have simple dependency system (just list the packages you need), you have true (recursive) reproducibility, and you could have only one container system for everything.
The issue is that Guix containers are not compatible with Flatpak portals (which is now pretty much a standard) and, from what I understood, are not really meant for security but more for the insuring basic reproducibility.
If some Guix guys would be interested in developing/improving a Guix container system to be compatible with Flatpak portals&APIs and that uses Guix packages instead of runtimes, I'd donate quite a bit for that. Maybe some other people would be interested in that too.
It still annoys me that Linux went down the route of hald for so long, before making the pivot to dbus (and udev). Especially since I was using FreeBSD in the 00's and early 10's, which had devd (an event-based system similar to udev, vs hald's polling system) and had to be hacked for all those years to emulate HAL's interface.
It would be far less annoying if there were some benefits to HAL's approuch, but event-based systems had long since been proven in nearly every OS except Linux.
OS' only job should be to let use ran apps and every year they find a way to make it more annoying.
Sure, this will receive a lot of hate (Electron eat ram mmkay). In the mean time I'm having MS Office on Linux. Real and official. What a time to be alive.
That sounds like its not gonna work well...
(You could problably use how well Chrome has gone as a rough indicator...)
Electron is actually the property of Microsoft (via GitHub [0]). So at least for Office there are no extra parties. And again, no I don't want it, but I want app parity with Windows so my kids school can't force me to put Windows on my machines. And no O365 in the browser is not ok, it offers a very poor experience imo. Just using the tab key in Excel online is maddening, although I expect one could get used to, I don't wish it upon my kids.
[0] https://en.wikipedia.org/wiki/Electron_(software_framework)
You actually said you wanted electron everything? Also, since electron is based on chromium...I sorta thought it was close enough to make my point.
A bit of a miscommunication there.
I work complete without paying any cent for any licenses - because of open software. That is a reason to jubilate.
For me future is less, but more controllable features. Things like dbus based security, snap or "universe" repo on Ubuntu are absolutely out of questions.
I really like OpenSuse and its direction. Conservative, yet fresh packages. Automated testing. Curated yet substantial package base. Package manager integrated with BTRFS snapshots...
Thus Flatpaks isolation and sandboxing of apps using "dbus based" security, pipewire and polkit.
Two sides of the coin of a stable and extendable system.
That doesn't seem practical.
Article fails to mention innovative OSes such as NixOS or Qubes. I would love to see a combination of these two as a desktop OS.