Bug#752075: daemontools-run: Add systemd support

Michael Stapelberg stapelberg at debian.org
Fri Jul 18 19:06:11 BST 2014


Hi Gerrit,

Gerrit Pape <pape at dbnbgs.smarden.org> writes:
> I'm really not keen to add a dependency to daemontools-run, esp. not to
> the runit package, just for (un)installing and starting/stopping a
> service.
I presume you mean init-system-helpers as the dependency you don’t want
to add.

> Why isn't it as simple as installing the unit, and then?:
>
>  systemd not installed || start service
It is as simple as that. deb-systemd-invoke supports policy-rc.d,
though, which your intended example (AIUI) does not. You’d make some
users really unhappy if you break policy-rc.d with your package.

>  systemd not installed || have service started by default
When systemd is not installed, where does the logic for having the
service started by default come from? While the actually relevant part
of that is as simple as creating a symlink, there are some things make
this entire process more complicated. Some of them come from the fact
that the enabled-state needs to be synchronized across init systems,
i.e. what you do in systemd should also work for the
sysvinit-fallback. We’ll most likely get rid of this in the next Debian
release, but for now we still have to support it.

Further, consider this (from the manpage of deb-systemd-helper):

  The "enable" action will only be performed once (when first installing
  the package). On the first "enable", an state file is created which
  will be deleted upon "purge".

…which enables administrators to disable units and not have them
magically re-enabled on the next package upgrade.

Also, the dh-systemd/deb-systemd-helper combination properly handles
mask-after-remove (i.e. remove but not purge).

In general, it’s hugely beneficial to Debian if packages use the same
helpers/debhelper addons to build their maintainer scripts. Bugfixes and
other improvements that we put into i-s-h will propagate to all packages
without coordinating huge updates/fixes. You don’t need to think about
all the intricacies of correctly handling unit files (in Debian!)
because we already did it.

Let me also point out that _every_ system already has i-s-h installed
these days, so there really is no cost in adding this dependency.

-- 
Best regards,
Michael




More information about the Pkg-systemd-maintainers mailing list