[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Nutty systemd package dependencies



Simon McVittie:

Once per thread about systemd, I point out that dbus-daemon links to both libapparmor and libselinux - which results in at least one useless library for literally everyone with dbus installed, since "major" LSMs don't stack, so nobody can possibly be using both AppArmor and SELinux at the same time. Oddly enough, nobody has complained about that, only about libsystemd...

Which rather neatly brings us to something that I've been wondering about for some time. It's a pointless package dependency. But for novelty it's one that the people who *use* systemd might be interested in, rather than the people who *want to avoid* systemd.

Consider the "initscripts" package.

The "systemd" package has an explicit package dependency from it (in both Debian 8 and the prospective Debian 9).

* https://anonscm.debian.org/cgit/pkg-systemd/systemd.git/tree/debian/control?h=debian/215-18&id=b1e8aa81062a0fcbcc27b99144521579ab873245#n56

The file list for the "initscripts" package (taking amd64 as an example) can be divided into five rough areas: rc scripts that live in /etc/init.d/, libraries of script functions that those scripts use, default settings in /etc/default/, an fsck shim for NFS, and doco.

* https://packages.debian.org/sid/amd64/initscripts/filelist

What's nutty about this is that systemd actually goes to significant lengths to exclude and disable the functionality of every single thing in the "initscripts" package. All of the rc scripts are masked or superseded. The script function libraries are largely for the benefits of said rc scripts, and end up being wholly unused by systemd. (Yes, they could be used by some other package. But that would require an explicit package dependency by that package. This is about the package dependency of the "systemd" package.) systemd explicitly checks for cases where things like fsck.nfs do not exist. And as people have observed passim on Stack Exchange and Debian/Ubuntu bug trackers over the past few years, systemd has quietly obviated things like /etc/default/tmpfs (the so-called "API filesystems" such as /run and /dev/shm being mandatory with systemd, and the systemd mechanism for setting options on such mounts being /etc/fstab via systemd-remount-fs) and /etc/default/devpts (the equivalents to TTYGRP and TTYMODE being hardwired into systemd).

* https://anonscm.debian.org/cgit/pkg-systemd/systemd.git/tree/debian/systemd.links?h=debian/215-18&id=b1e8aa81062a0fcbcc27b99144521579ab873245

* https://github.com/systemd/systemd/blob/7163e1ca1108d789ee8b40238ebf0f6978cd58a9/src/shared/generator.c#L108

* https://freedesktop.org/software/systemd/man/systemd-remount-fs.service.html

* https://github.com/systemd/systemd/blob/2056ec192742d45aa72a851dbd22ad1fe0bc91a2/src/core/mount-setup.c#L90

This does rather beg the question of why, after ensuring that *nothing* from it is used in any way, the "systemd" package yet explicitly requires the installation of the "initscripts" package.


Reply to: