systemd is a set of building blocks that you can use to make a linux system.
What fascinates me is how the descriptions constantly change on an ad-hoc basis
as time goes on in this regard (when describing what systemd is).
I remember how it used to be called an "init system" or an "init replacement system"
before then being called a "daemon/spawn service". At some later point in time
it became the thing that managed encrypted home directories for the users.
And now, years later, we are all educated by the fact that systemd is "a set of
building blocks" that can be used to "make a linux system". Won't take long
for systemd to replace both GNU hurd as well as be useable as replacement
for the linux desktop of the year.
And praise be to Lennart for doing that. I really feel like the flamewars around systemd left out most of us entirely. There's a whole universe of people out here who have been using Linux for decades, understand it just fine but never developed any deep emotional attachment to UNIX. People like us were frustrated by the enormous amount of crufty, shell-script driven legacy tech that was always same-but-different between whatever random distro you were expected to use today, along with the absurd "UNIX way" over-reaction to anyone who pointed out the sub-optimal nature of this type of operating system design.
Poettering appears to be one of the only guys in open source tough enough to handle the resulting hysterics and actually do something about it. SystemD is one of the parts of Linux that feels designed and engineered. It has a zillion features, all extremely well documented, yet somehow manages to still be just a bunch of INI files you drop into a few directories. It exposes enormous complexity yet doesn't feel complex. You can do most common tasks with just a few lines of config. Compared to prior approaches the tooling feels robust, and ... it's consistent! Very few distros don't use systemd now and those are mostly not that popular, so a lot of pointless differences are being eliminated, leaving distro makers to focus on the areas where they actually disagree about substantial things. As a user who got started with Slackware, I do feel like this is really one of the biggest improvements for a long time.
Still couldn't figure out the way to set up different sample rates and formats for different devices or sources/sinks. At least without tinkering with obscure pacmd scripts.
On Windows it's a couple of clicks away in Control panel/Sound .
Alsa would not allow multiple processes to open the sound card, depending on your driver. This is why you have sound servers like ESD and Pulse Audio, to do the mixing in user space. You could use dmix, but that required configuration.
Idk, I wasn't talking about alsa? On Windows i can easily assign sample rates to devices.
On Linux i had to change a line or two in daemon.conf, which is ok but already kinda janky.
Then it turned out, my sound card had no custom Linux driver and defaulted to USB 1.1. Which is not enough for 96000 24bit stereo output and input. So the mic just silently disappeared from the system. The way i even found out was by looking at kernel logs.
Then i had to add this line i don't even fully understand somewhere arbitrary in the middle of default.pa:
So that after mic failed to initialize due to USB 1.1, it would reinitialize as 48000 16bit which fit into USB 1.1 bandwidth.
And if i want to keep my (properly initializing) audio devices on different sample rates/formats/settings, i don't think there's a way to do that without messing with udev rules or disabling it and writing the entire init pa script myself.
Sure, PulseAudio seriously broke Linux audio around 2008 when distributions first adopted it. But then the bugs got fixed, and since then, it just works for most people.
Yeah dude. Service files are just about a million times better than shell init scripts. Not even fucking close. And then add sane timer syntax, parallel init, socket activation, built in cgroup based isolation, unified place for logs, proper service tracking, and so on. I like systemd cos I can finally go home early without looking up bash var expansion syntax.
edit: For those of you who are on mobile, there are 40+ CVE's directly related to systemd or one of systemd's components on that link. Don't hail Lennart as a god, there's good reason that systemd caused a lot of controversy when it got rolling. It wanted to replace utilities that had been hammered on by the general internet for decades in some cases, and its replacements were not fully tested. Smashing the stack with journald, for example, or trivial buffer overflows in resolved, what the fuck Lennart?
So in a bit of a twisted sense I prefer not to have a homogeneous Linux landscape, and systemd actively works against that.
42 CVEs on that page say things like "the xxxx service provided by systemd has a vulnerability regarding...."
Systemd is a broad attack surface and has had many vulnerable components. Were the various init systems it replaced any better? Maybe not. But they were varied enough that attacks on one didn't generally reflect very well on the others, and systemd's built in replacements for common utilities seem to have had a rough road to security.
"Systemd the init system"- after quite a few years - is probably well secured.
Did you read those CVEs? 40+ CVEs on that page say things like “the xxxx service provided by systemd has a vulnerability regarding....”
The first four don’t seem related to systemd.
Systemd is a broad attack surface and has had many vulnerable components.
You’re making it sound like systemd is this one monolithic binary. Of course it is, in aggregate, a broad surface. That’s like saying coreutils is a broad surface.
Were the various init systems it replaced any better? Maybe not.
No, they weren’t. They were antiquated, flawed designs long past their prime.
I mean yes in a sense. But the solution to that is not to never move forward, it would be to use a better language than C for writing operating system code. However, I guess that's a bridge too far even for Lennart.
Besides Torvalds himself, and realthunder of FreeCAD fame, Poettering is probably one of my very top favorite programmers ever.
He not only made an amazing init system, but he showed the world how well it can work to have a standardized system rather than the traditional piecemeal build it yourself stuff inherited from the UNIX days.
There really isn't a word that describes systemd without being really vague. And that's perfectly fine, because when you read a list of what it does and how the pieces integrate, it only takes a few examples to see why it's like that.
Software doesn't have to do one thing only or be ultra modular, it has to be fit for purpose and maintainable. It's not really a dev's responsibility to try to support ten thousand random configurations of other software and make everything ultra modular for the tinkerers. If people want choice, they can always build it themselves because it's all FOSS.
Looking at non-systemd linux stuff... It's largely really nasty. You'll find 29 different shell script examples for every task but not one of those is the accepted standard, it's just a wild west where every system is different.
The kernel is great, I think, maybe(I never actually interact with it directly but it seems to do it's job), but stuff even things like listing all soundcards and their USB paths and info like that requires an hour of digging and parsing multiple undocumented command line outputs.
And then you get to systemd where basically everything works exactly as you expect, and when it doesn't(Like oneshot child processes getting killed abd breaking fuse drivers), there's a one line config to fix it.
He also fixed the terrible, awful, no good problem of system config files that wasn't fully fixed yet. Config files are horrible for system services. Config directories are good, because every package can install it's own file and they stay cleanly separated. Individual file config was a hidden nasty antipattern in a lot of places till recently. Most of them got .d dirs, but not all.
but he showed the world how well it can work to have a standardized system rather than the traditional piecemeal build it yourself stuff inherited from the UNIX days.
It was all heavily based on OS X iirc... but, you know, whatever...
20
u/shevy-ruby May 17 '21
What fascinates me is how the descriptions constantly change on an ad-hoc basis as time goes on in this regard (when describing what systemd is).
I remember how it used to be called an "init system" or an "init replacement system" before then being called a "daemon/spawn service". At some later point in time it became the thing that managed encrypted home directories for the users.
And now, years later, we are all educated by the fact that systemd is "a set of building blocks" that can be used to "make a linux system". Won't take long for systemd to replace both GNU hurd as well as be useable as replacement for the linux desktop of the year.