[Pkg-systemd-maintainers] Bug#709842: [PATCH] Add new helper dh_installsystemd

Michael Stapelberg stapelberg at debian.org
Sat May 25 22:56:46 BST 2013


Package: debhelper
Version: 9.20130518
Severity: wishlist
Tags: patch
X-Debbugs-CC: pkg-systemd-maintainers at lists.alioth.debian.org

Hi Joey,

I have been working on dh_installsystemd lately and I am confident that
it is ready for inclusion into debhelper after being tested for several
weeks by several maintainers.

Find the patch attached, and here is a quote from its commit message:

----------------------------------------------------------------------

This helper is called automatically by dh(1). It enables systemd unit
files and handles start/stop/restart on upgrade for unit files without a
corresponding SysV init script.

In order to enable systemd unit files, a dependency on
init-system-helpers is added to the package. This dependency is
necessary to ensure deb-systemd-helper is present, which will enable
unit files on any machine, regardless of whether it runs systemd or not.
This in turn is a requirement for switching from sysvinit to systemd and
vice-versa.

The raison d'ĂȘtre for dh_installsystemd is the fact that some packages
ship multiple service files but only a single SysV init script, i.e.
there is no 1:1 correlation between systemd unit files and SysV init
scripts. As an example, samba consists of smbd and nmbd, but both are
started using /etc/init.d/samba, whereas with systemd, one might use
smbd.service and nmbd.service instead. For such cases it makes sense to
have a separate helper instead of trying to cram the functionality into
dh_installinit.

dh_installsystemd was tested with numerous packages that use different
sets of features. Among the tested packages are alsa-utils, rsyslog,
dbus, nginx, udisks, irker, pyroman, all-knowing-dns and kanla.

In case dh_installsystemd adds undesirable code to your maintscripts,
please contact pkg-systemd-maintainers at lists.alioth.debian.org and
temporarily disable dh_installsystemd with this make rule:

    # Disable dh_installsystemd
    override_dh_installsystemd:

----------------------------------------------------------------------

To be clear about this: dh_installsystemd does _not_ replace
dh_installinit or any of its code, not even the systemd-related code.

In case you have any questions, please feel free to ask :).

Thanks!

-- 
Best regards,
Michael
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dh_installsystemd.patch
Type: text/x-diff
Size: 17226 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/pkg-systemd-maintainers/attachments/20130525/97c145c2/attachment-0001.patch>


More information about the Pkg-systemd-maintainers mailing list