Re: Bug#1117735: Restarting systemd user units on package upgrade
On 2025-12-02 18:58 +0000, Simon McVittie wrote:
> On Tue, 02 Dec 2025 at 15:11:08 +0000, Sean Whitton wrote:
>>We would like the postinst for dgit-infrastructure.deb to restart any
>>running instances of [a user service] it finds on the host.
>
> dh_installsystemduser seems to have automation for this, but only in
> compat level 14, which is opt-in and newer than the default. I don't
> see a way to opt-in to just that one behaviour of compat level 14
> without the rest of it.
At least it is possible to limit the behaviour changes to that
particular command via debian/rules, and this is usually good enough.
override_dh_installsystemduser:
DH_COMPAT=14 dh_installsystemduser [...]
Cheers,
Sven
Reply to: