[systemd-devel] /usr/lib/systemd/*.wants vs. Wants in unit definition

Lennart Poettering lennart at poettering.net
Tue Jun 7 09:49:18 UTC 2016


On Mon, 06.06.16 14:56, Andrei Borzenkov (arvidjaar at gmail.com) wrote:

> On Mon, Jun 6, 2016 at 2:26 PM, Martin Pitt <martin.pitt at ubuntu.com> wrote:
> > Andrei Borzenkov [2016-06-06 13:55 +0300]:
> >> What is advantage in having static *.wants etc directories in
> >> /usr/lib/systemd vs. Wants etc directives directly in unit definition?
> >> They complicate troubleshooting (you no more have complete definition
> >> by looking just at unit source), they complicate building (extra steps
> >> to install them); what are they good for?
> >
> > These are much simpler to ship in packages than shipping a
> > foo.service.d/mywants.conf with "Wants=".
> 
> Sorry I had to be more clear. What is advantage of shipping them in
> systemd? Systemd has well defined early boot services that are always
> needed. Why they are shipped as links instead of actually expressing
> those mandatory dependencies in unit definitions themselves?

Well, downstream can split up the RPMs/DEBs in a multitude of
ways. For example, things like udev, rfkill, backlight could be split
into one subpackage that is only installed on physical systems but not
when run in a container, as those three services only make sense if
your system runs on physical hardware. How downstream decides to split
things up into RPMs is really up to them, but we should make it easy
to make the modules separate enough to support this.

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list