One software freedom that Stallman does not mention is the freedom *not* to use the program because you dislike or don't want it for some reason

Free software tends to be flexible, have clear boundaries, split responsibilities, and replaceable components, thanks in part to openly defined protocols and formats

Proprietary software tends to want to lock you in into their freaking ecosystem, and even if they adopt an open standard, it's a part of an E-E-E strategy


@Wolf480pl I'm a fan of systemd actually :) it is free software and it is quite modular, contrary to some beliefs. Different distros ship with different sets of systemd components. Wouldn't hurt for it to be even more modular, such as supporting elogind (being able to use logins without systemd the PID 1) upstream.

Last time I checked, systemd had no open standards (maybe except unit file format). libsystemd's API is the only thing you're supposed to depend on, and the communication methods used for socket activation, startup notification, communication between udev and systemd, communication between systemd and logind, etc. are declared as implementation details and subject to change without notice.

Also, things like systemd-networkd, systemd-resolved, systemd-timesyncd, etc. look to me like a blend of EEE and scope creep.

@bugaevc at the end of the day, systemd does pretty bad on the "freedom not to use it" front, IMO.

@Wolf480pl well, hello there from a Linux-based system that doesn't use systemd :)

@Wolf480pl also, hello from a GNU system that doesn't use systemd (or Linux)

I didn't say it fails completely, but I suspect it places a lot of burden on distro maintainers who want to support non-systemd inits, comparable to that of using non-gnu libc.

@Wolf480pl distro maintainers should just chose which one init system their distro uses and support that. I know Debian and Gentoo want to support all the different configurations, but that's up to them.


@Wolf480pl My point here, as far as "freedom not to use" goes, systemd doesn't require individual services to be written in some systemd-specific way (e.g. as dynamically loaded plugins with some entry points, against systemd-specific API/ABI). No, they're just plain Unix executables launched as any other executable. They don't have to care if they're started (and watcher over) by systemd, another init system, from an interactive shell or whatever.


@Wolf480pl (That, and systemd also provides sysvinit's config format compatibility.)

This is why you can run pretty much anything that wasn't explicitly written against systemd (and often predates systemd) with systemd. This is why you can pretty much just swap out init systems and have all the services work the same. I imagine the situation on Windows is much different (though I don't know too much about Windows internals).


@Wolf480pl If a service wants to make use of systemd features such as socket activation, than indeed it needs a small systemd-specific codepath that checks if it's even running "on systemd" and does the appropriate setup. But again, this works without systemd (as a no-op) and you don't need this with systemd (but you won't get some niceties).


> not a dynamically loaded shared library with systemd-specific entrypoint

> not as bad as Windows

Let's not have such low standards. Just because something isn't mind-boggingly horrible, doesn't mean it's good.

>systemd doesn't require individual services to be written in some systemd-specific way

But encourages them to do so.

That, and

>That, and systemd also provides sysvinit's config format compatibility.

is exactly how embrace-extende-extinguish works.

Everything written without systemd in mind will work with systemd.

Anything written with systemd in mind, linking to libsystemd (and, in case of desktop environments, probably also using some systemd's d-bus APIs) will not work without systemd.

@Wolf480pl no. Services aren't written, and aren't encouraged to be written in systemd-specific ways, they're just plain old Unix executables, and any plain old Unix executable can be run as a systemd service.


@Wolf480pl systemd integration (sd_listen_fds and such) should of course be hidden behind an ifdef & a build time option that controls that ifdef and adds or removes libsystemd to the list of dependencies. And again, even if a service is built against libsystemd, it's a no-op at runtime unless systemd (or another service manager using a compatible API) is in use.


@Wolf480pl what? systemd (the PID 1) spawns your process using Unix's standard fork() + exec(), and passes you journal fd as standard IO, and socket fds using the standard Unix fd passing. Most public APIs of systemd components are even exported as clearly documented D-Bus interfaces. Honestly some projects could learn from systemd :)

@Wolf480pl to quote Lennart,

"Let me point out that the interfaces used here are in no way bound directly to systemd. They are generic enough to be implemented in other systems as well. We deliberately designed them as simple and minimal as possible to make it possible for others to adopt similar schemes."

@bugaevc then why do the docs and blog posts tell you to use sd_notify and sd_listen_fds and barely if at all mentions the interface below?

@Wolf480pl they recommend it because these are the convenient wrappers (in case of sd_notify, so that you don't have to mess with sending credentials over a datagram socket yourself). And the docs do a good job of describing the underlying interface, see e.g.

>socket fds using the standard Unix fd passing

But you don't know which fds these are, and how many there are, and you're supposed to use sd_listen_fds and SD_LISTEN_FDS_START from libsystemd to find out.

Of course SD_LISTEN_FDS_START is just 3, and sd_listen_fds just reads an environment variable LISTEN_FDS. But IIRC systemd devs consider this an implementation detail and reserve the right to change it any time.

And then, unless your service is of Type=forking (which is "deprecated"), you're supposed to tell systemd when you're done starting up by means of sd_notify.

Which just writes something to a socked specified by NOTIFY_SOCKET env var, but again, that's implementation detail / subject to change.

Last time I checked, all these env vars were not standardized and subject to change. But that was long time ago. Have they since standardized it, and committed to not breaking it? Because that'd be really nice.

@Wolf480pl exactly, it's just 3 and those env variables. I didn't get the impression that these are the internal implementation details / subject to change without notice. That same blog post actually encourages you to reimplement them yourself if you don't want to use sd_* utilities:



"Eventually we plan to turn this into a proper shared library, however using the drop-in files allows you to compile your project in a way that is compatible with socket activation even without any compile time dependencies on systemd. sd-daemon.c is liberally licensed, should compile fine on the most exotic Unixes and the algorithms are trivial enough to be reimplemented with very little code if the license should nonetheless be a problem for your project."


I've only seen one daemon do that, everyone else just falls for the libsystemd bait.

>Most public APIs of systemd components are even exported as clearly documented D-Bus interfaces

Ok, could you please point me to something docunenting how udev interacts with systemd? I've always wondered how this works and how hard it'd be to reimplement the whole multiseat thing without systemd.

Sign in to participate in the conversation
Mastodon for Tech Folks

The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!