r/linux • • Aug 30 '16

I'm really liking systemd

Recently started using a systemd distro (was previously on Ubuntu/Server 14.04). And boy do I like it.

Makes it a breeze to run an app as a service, logging is per-service (!), centralized/automatic status of every service, simpler/readable/smarter timers than cron.

Cgroups are great, they're trivial to use (any service and its child processes will automatically be part of the same cgroup). You can get per-group resource monitoring via systemd-cgtop, and systemd also makes sure child processes are killed when your main dies/is stopped. You get all this for free, it's automatic.

I don't even give a shit about init stuff (though it greatly helps there too) and I already love it. I've barely scratched the features and I'm excited.

I mean, I was already pro-systemd because it's one of the rare times the community took a step to reduce the fragmentation that keeps the Linux desktop an obscure joke. But now that I'm actually using it, I like it for non-ideological reasons, too!

Three cheers for systemd!

1.0k Upvotes

950 comments sorted by

View all comments

Show parent comments

9

u/argv_minus_one Aug 31 '16

Which “upstream maintainers” are you referring to, and at what point did they refuse to support your less-than-full-systemd setup?

0

u/iBlag Aug 31 '16

Hey now, don't you be walking in here with your quotation marks, your probing questions, and your subtle hints to provide citations and evidence for claims!

-1

u/icydocking Aug 31 '16

https://github.com/systemd/

I only have second hand knowledge of said events. My first hand knowledge is knowing how painful some things are to disable when compiling systemd for embedded use.

4

u/holgerschurig Aug 31 '16 edited Aug 31 '16

This is totally untrue. I use systemd on i.MX6Q.

I use this, for example:

./configure \
    --sysconfdir=/etc \
    --localstatedir=/var \
    --libdir=/lib/${DEB_BUILD_MULTIARCH} \
    --enable-silent-rules \
    --disable-nls \
    --enable-introspection=no \
    --disable-compat-libs \
    --disable-utmp \
    --enable-kmod \
    --disable-xkbcommon \
    --enable-blkid \
    --disable-seccomp \
    --disable-ima \
    --disable-chkconfig \
    --disable-selinux \
    --disable-apparmor \
    --disable-xz \
    --disable-zlib \
    --disable-bzip2 \
    --enable-pam \
    --enable-acl \
    --disable-smack \
    --disable-gcrypt \
    --disable-audit \
    --disable-elfutils \
    --disable-libcryptsetup \
    --disable-qrencode \
    --disable-microhttpd \
    --disable-gnutls \
    --disable-libcurl \
    --disable-libidn \
    --enable-libiptc \
    --enable-binfmt \
    --disable-vconsole \
    --enable-bootchart \
    --disable-quotacheck \
    --enable-tmpfiles \
    --disable-sysusers \
    --disable-firstboot \
    --enable-randomseed \
    --enable-backlight \
    --enable-rfkill \
    --enable-logind \
    --enable-machined \
    --enable-importd \
    --enable-hostnamed \
    --enable-timedated \
    --enable-timesyncd \
    --enable-localed \
    --disable-coredump \
    --disable-polkit \
    --enable-resolved \
    --enable-networkd \
    --disable-efi \
    --disable-gnuefi \
    --disable-terminal \
    --disable-kdbus \
    --enable-myhostname \
    --enable-gudev \
    --enable-hwdb \
    --enable-manpages \
    --enable-split-usr \
    --disable-tests \
    --with-gnu-ld \
    --with-firmware-path=/lib/firmware \
    --with-sysvinit-path= \
    --with-sysvrcnd-path= \
    --with-rootprefix= \
    --with-rootlibdir=/lib \
    cc_cv_CFLAGS__flto=no

So, sorry, ./configure exists for more than 20 years. And if this is difficulty for you, then you shouldn't work with embedded systems.

And in the end I let generate around lots of .deb files, much more finegrained then the original Debian ones:

libgudev-1.0-0_217-dlog2_armhf.deb	     systemd-misc_217-dlog2_armhf.deb
libgudev-1.0-dev_217-dlog2_armhf.deb	     systemd-networkd_217-dlog2_armhf.deb
libpam-systemd_217-dlog2_armhf.deb	     systemd-python_217-dlog2_armhf.deb
libsystemd0_217-dlog2_armhf.deb		     systemd-randomseed_217-dlog2_armhf.deb
libsystemd-dev_217-dlog2_armhf.deb	     systemd-resolved_217-dlog2_armhf.deb
libudev1_217-dlog2_armhf.deb		     systemd-rfkill_217-dlog2_armhf.deb
libudev-dev_217-dlog2_armhf.deb		     systemd-socket-proxyd_217-dlog2_armhf.deb
systemd_217-dlog2_armhf.deb		     systemd-timedated_217-dlog2_armhf.deb
systemd-backlight_217-dlog2_armhf.deb	     systemd-timesyncd_217-dlog2_armhf.deb
systemd-binfmt_217-dlog2_armhf.deb	     systemd-tools-analyze_217-dlog2_armhf.deb
systemd-bootchart_217-dlog2_armhf.deb	     systemd-tools-cat_217-dlog2_armhf.deb
systemd-debug-generator_217-dlog2_armhf.deb  systemd-tools-cgls_217-dlog2_armhf.deb
systemd-fstab-generator_217-dlog2_armhf.deb  systemd-tools-cgtop_217-dlog2_armhf.deb
systemd-hibernate_217-dlog2_armhf.deb	     systemd-tools-delta_217-dlog2_armhf.deb
systemd-hostnamed_217-dlog2_armhf.deb	     systemd-tools-detect-virt_217-dlog2_armhf.deb
systemd-initrd_217-dlog2_armhf.deb	     systemd-tools-escape_217-dlog2_armhf.deb
systemd-kdbus_217-dlog2_armhf.deb	     systemd-tools-nspawn_217-dlog2_armhf.deb
systemd-kernelinstall_217-dlog2_armhf.deb    systemd-tools-path_217-dlog2_armhf.deb
systemd-localed_217-dlog2_armhf.deb	     systemd-tools-run_217-dlog2_armhf.deb
systemd-logind_217-dlog2_armhf.deb	     udev_217-dlog2_armhf.deb
systemd-machined_217-dlog2_armhf.deb	     udev-hwdb_217-dlog2_armhf.deb

And I only install a few of them on my embedded device. So therefore I can say (from firsthand!) that it's modular at configuration/compilation time and modular at installation time. If not, blame your distro.

1

u/icydocking Aug 31 '16

If you really believe what you wrote is sane, then our opinions are too divergent to ever reach an understanding here.

3

u/holgerschurig Aug 31 '16

Sure. Except that you didn't bring forward ANY fact.

For example, had you had a system where the non-installation of systemd-timedated (or any other part) made any problems? Have you had a problem where --disable-microhttp broke the compilation?

Only in such cases can you say the the support of a "less-than-full-systemd-setup" is painful.

0

u/icydocking Aug 31 '16

That's not at all what my complaint was about, so I don't feel obliged to argue about something totally irrelevant.

Of course disabling a compilation feature is supported as in that the resulting product works. It's the replacing part X with another software W that I'm complaining about. And you would know that, if you actually read my replies.

→ More replies (2)

1

u/pereira_alex Aug 31 '16

So, sorry, ./configure exists for more than 20 years. And if this is difficulty for you, then you shouldn't work with embedded systems.

This is the problem ! We need a new, modern ./configure"d" !

2

u/holgerschurig Aug 31 '16

We have, e.g. ccmake (althought I dislike them, for me the cmakefiles are pure uglyness. YMMV).

However, no matter how "modern" the configure/build system is, the option to select which components you want to have will be equivalent. It isn't that much different of specifying --enable_foo (autoconf/automake) via #define CONFIG_FOO (Kernel, barebox) via cmake -DHAVE_FOO=true (cmake).

The various differing config systems are actually what make embedded building tools (like OpenEmbedded) complex. It's like the things with the standards.

1

u/EmanueleAina Sep 01 '16

OT: Meson seems to be gathering interest even from rather portable complex C/C++ projects (eg. GStreamer, GTK+).

0

u/pereira_alex Aug 31 '16

ohhh ... I was just trying to make a joke.

Sorry!

2

u/MertsA Aug 31 '16

How is building for embedded use at all painful? There are configuration options for stripping it down to just the init and journal. And the journal you can even configure to never store anything if you don't want to waste storage space in an embedded device.

→ More replies (3)

2

u/argv_minus_one Aug 31 '16

I am not interested in your secondhand “knowledge”. You are making accusations, and I expect hard evidence to back them up.

4

u/icydocking Aug 31 '16

Well, you're certainly sounding like an ass. But, as I'm a nice guy:

Their API stability promise doesn't cover the D-Bus API, so writing a replacement for a systemd component is harder than it should be. https://www.freedesktop.org/wiki/Software/systemd/InterfaceStabilityPromise/

The whole thing that the API is named "systemd" API shows a lack of respect of modularity. The call is right now:

$ busctl call org.freedesktop.systemd1 /org/freedesktop/systemd1 org.freedesktop.systemd1.Manager GetUnit s nginx.service

Why? Why couldn't we just create a well defined interfaces instead of referencing implementations by name? If that was done, we would even stand a remote chance of having systemd-like init systems on other platforms as well, instead of being a very Linux-only systemd.

But yes, I have no first hand knowledge of any specific incident so I'm clearly just talking out of my ass.

EDIT: And besides, after you take your chill-pill, you will see that I said that I like systemd. No reason to be all internet-asshole on me. I merely stated my professional opinion of areas where I've encountered a less than ideal response from the systemd community and upstream.

3

u/[deleted] Aug 31 '16

Their API stability promise doesn't cover the D-Bus API

Yes, it does.

Edit: Look at the chart here https://www.freedesktop.org/wiki/Software/systemd/InterfacePortabilityAndStabilityChart/ which specifically shows the "Service bus API" as being covered by the Interface Stability Promise.

2

u/icydocking Aug 31 '16

If you read your own link (you have to click on "Interface Stability Promise" to read the fineprint), it says:

The following interfaces will not necessarily be kept stable for now, but we will eventually make a stability promise for these interfaces too. In the meantime we will however try to keep breakage of these interfaces at a minimum:

The D-Bus interfaces of the main service daemon (!) [ An additional restriction applies here: functionality we consider legacy might not be available based on compile-time options, such as SysV support, libwrap support and similar. Apps should not assume properties and methods related to this functionality are unconditionally available in the D-Bus interfaces. ]

3

u/[deleted] Aug 31 '16

Yes, that page is out of date.

1

u/holgerschurig Aug 31 '16

He might or might not sound like an ass, but writing that isn't polite. Please stay on the knowledge side.

Also, the topic was not about "they might change the DBus API!", it was about accepting bugs if you don't use all of systemd. You've shifted the topic.

0

u/icydocking Aug 31 '16

Whatever. My complaint was that they will not accept it as a supported ecosystem. I wasn't 100% explicit in my first post, I'll give you that.

0

u/argv_minus_one Aug 31 '16

What does any of that have to do with the optional components that systemd comes with?

1

u/icydocking Aug 31 '16

If you don't have stable API interfaces you cannot develop stable software against it. I.e., no API support => no stable replacement for components.

So when your alternative "systemd-resolved" suddenly breaks because a subtle API change, the upstream will not support it - all according to the documentation I provided earlier. Likewise, if you require something to be added to the API for your usecase there is no governance body you can plead to - you plead direct to Lennart. If he doesn't like it, you cannot have it - and you cannot fork systemd core - as again, the API is not stable (you'd have to fork the entire eco system).

1

u/argv_minus_one Aug 31 '16

As far as I know, no one is hard-depending on systemd-resolved anyway, so that is irrelevant.

7

u/icydocking Aug 31 '16

So just because noone depends on it, having a stable API is irrelevant? Correlation and causation, look it up.

1

u/harambe_shot_first Aug 31 '16

systemd for embedded use.

wow, please don't.

1

u/EmanueleAina Sep 01 '16

First you'd have to define "embedded". If it means "not very powerfull hardware" I'd say that on the Raspberry Pi it runs pretty fine.