[Pkg-utopia-maintainers] Bug#715247: Bug#715247: [Pkg-systemd-maintainers] Bug#715247: [PATCH] proper maintscripts by using dh-systemd

Michael Stapelberg stapelberg at debian.org
Thu Aug 29 20:54:37 UTC 2013


Hi Michael,

Michael Biebl <biebl at debian.org> writes:
> I've looked at this patch and I'm not sure we need it. A few thoughts:
>
> - udisks2.service doesn't have an [Install] section, it's a purely dbus
> activated service which doesn't need to be enabled. Yet dh-systemd
> generates some unnecessary maintainer scripts code [1] to enable|disable
> this service.
>
> - we already handle the restart-on-upgrade case [2] and stop-on-remove
> [3] (in a way which already works for both systemd and sysvinit). We
> can't really get rid of the sysvinit code (at least for now). So we
> don't really gain anything from using dh-systemd.
>
> - udisks2 is supposed to be activated on-demand, so we probably
> shouldn't start it unconditionally in postinst which the current
> dh_systemd_start call does.
> The default dh_systemd_start behaviour of "stop in prerm, start in
> postinst" on upgrades isn't the best choice for D-Bus activated services
> either, as you could have an activation request while the package is in
> an inconsistent state. --restart-after-upgrade or (manually) masking the
> service during upgrades is something we would need here.
>
> - the current postinst only restarts udisks2 if it's already running,
> basically the equivalent to systemd's try-restart. dh-systemd currently
> doesn't allow use that kind of functionality.
> For packages shipping both sysv init script + systemd service file,
> where we use update-rc.d/invoke-rc.d, we are (currently) limited to what
> API invoke-rc.d provides. Maybe we can utilize try-restart for
> systemd-only packages.
>
> That said, I'm not sure if this particular package requiring this
> specific behaviour isn't too much of a special case which needs to be
> supported by dh-systemd and we should rather use hand-written maintainer
> scripts code.
>
> In conclusion I think it's probably best, to revert this commit for now
> and maybe have a look if we can improve dh-systemd to better handle such
> types of D-Bus activated services.
I agree with everything you wrote :). Thanks for having a close look.

-- 
Best regards,
Michael



More information about the Pkg-utopia-maintainers mailing list