Correct way to handle systemd integration in packaging
halfdog
me at halfdog.net
Sat Mar 18 14:08:36 GMT 2017
Hi,
[OT: A previous message with similar content did not make it to
the maintainers list, so attempting again ...]
This is a part of the conversation to ITP/RFS issue for guerillabackup
from https://bugs.debian.org/849754 .
> Andreas Henriksson wrote:
> > me at halfdog.net wrote:
> > * (Re)starting units on upgrade: As stated in documentation, two
> > services can be used also from commandline (on demand) or as
> > non-root user, depending on end user use cases. Thus it is intended,
> > that the two systemd units are not enabled by default. Also
> > a user may start them manually without enabling them. With upgrade
> > following problem may arise: with standard debhelper means it
> > was not possible to
> > 1) stop all running units and
> > 2) after update start only those, that were running beforehand.
> > Solution:
> > 1) do not use debhelper for stopping/starting of units,
> > 2) find out in "prerm" which units are currently running, stop them and
> > 3) in "postinst" start only those, that were running in step 1)
>
> Pretty please do not try to reinvent systemd integration on your own.
> This is just way to easy to get wrong. If the current helpers does
> not work for you it's either likely because you're using them wrong
> and/or because they should be improved. Anything else is likely just
> causing extra work and pain.
>
> Please swing by either the irc channel or contact the mailing list
> for the Debian systemd maintainers. They're very skilled and usually
> happy to help (time permitting). They are likely also the people
> you need to get to review your package anyway if you invent your
> own maintainer script scheme.
So what are the opinions on this list? I am grateful for any advice
helping to improve the package! The package sources can be found
at https://mentors.debian.net/package/guerillabackup . The version
there does not yet address the other remarks from Andreas' review.
If that would be relevant, just tell and I will build a new package
addressing the non-systemd review comments.
hd
More information about the Pkg-systemd-maintainers
mailing list