Hacker News new | ask | show | jobs
by rollcat 1705 days ago
systemd is so complex, I've come to a conclusion, that it no longer fits my definition of free software.

We allow runaway complexity to obscure the inner workings of an important software package, to the point, where having source access no longer makes a practical difference to a "casual" power-user or even a software engineer. I can source-dive runit, s6, OpenBSD's rc, or OpenRC and within a weekend, have a pretty OK understanding, fix a bug, or add a feature. Having software as complex as systemd taking so many roles, and making itself so ubiquitous and irreplaceable, makes me feel that I no longer have any control or understanding of my system, bugs or misfeatures just become things you live with, or you riddle yourself with arcane workarounds. Portability suffers, monoculture takes root.

I've lost faith in "mainstream" Linux distros. I use macOS and OpenBSD for workstations, and Alpine where I need e.g. Docker. It must either be simple enough to understand, or provide enough utility/convenience that the lack of (practical) source access is compensated. systemd fits neither category.

3 comments

Have you actually tried to dive into the part you're interested in? Where did you find the complexity? I've done it a few times for different components and found them pretty well separated and the source pretty straightforward. I have other issues with them, but complexity/obscurity of the is was not one of them.
Looking at using systemd to just run a binary automatically on boot (which some smart person on HN told me was the easiest way). Just looking at the systemd landing page overwhelms me.

Boot Loader Interface, Discoverable Partitions Specification, etc.

I’m sure the implementation details are very interesting.

But where is the “Configure and Start a Service” option? Which is arguably the most important.

The man pages are the reference manual. You might want to search for "systemd service tutorial" or something like that, there's a lot of blogs that explain how to make a simple service.
Their frontpage sucks, but that's not related to the code really :)

For a quick intro to new services, see the examples here: https://www.freedesktop.org/software/systemd/man/systemd.ser... (they should cover most basic needs) then read above for the details on the parameters. You stick the file in /etc/systemd/system/your_thing.service and enable/start it.

I'm not sure why this comment was downvoted. I've read all the systemd documentation and this comment is spot on. System is lacking good documentation along the lines of "the least you need to know to setup and manage a service".

No, it's not as easy as "man systemd.service".

What's probably most useful in that documentation is the "hello world" example, which is buried at the bottom of the documentation. Also, key details are elsewhere, in "man systemd.exec" and "man systemd.unit".

The systemd docs a great comprehensive reference, but the man pages are poor introductory documentation.

Some useful tips that are hard to find:

  * man systemd.directives documents every directory and will tell you which man page as the full documentation for it.
  * man systemd.index lists every man page related to systemd.
Yes, systemd has a ton of surface area and options. Yes, the man pages are long. No, you don't need to read them--the beauty of systemd is you control how much of the complexity you use. Unit files can be 10 lines or 30. Most of the extra options are for security and hardening, when you need them you'll be glad they're easy to turn on. For the other components, I think have a stable, familiar, and consistent set of core services (boot, ntp, logging, networking) is glorious
That's an interesting line to draw! Do you think this also extends to stuff like firefox or java vm, or are you only focusing on "system" software with that analysis?
The key is how necessary the complexity is. The existence of simpler alternatives to systemd (that work just as well to run a system with) prove that its complexity is unnecessary. For things like Web browsers, the complexity is necessary, for better or worse.
I'm trying to balance between idealism and pragmatism. Source access is pragmatic only in a situation where you feel confident to dive it. I admire projects like suckless, Alpine, or Netsurf, because they prove this kind of balance can be maintained. But I'm still posting this from Safari ;)