Bug#1065624: resolved not working after installation, race with dbus and user creation
Luca Boccassi
bluca at debian.org
Sun May 26 14:38:59 BST 2024
On Thu, 7 Mar 2024 16:26:28 +0100 Michael Biebl <biebl at debian.org>
wrote:
> Am 07.03.24 um 16:22 schrieb Michael Biebl:
> > The chain of events afaics is this:
> >
> > 1/ postinst creates systemd-resolve
> > 2/ systemd-resolved.service is started in postinst
> > 3/ dbus trigger is activated after postinst and the dbus config is
reloaded
> >
> > Because the dbus daemon reload happens after the systemd-resolved
user
> > has been created, systemd-resolved could not successfully claim the
> > org.freedesktop.resolve1 D-Bus name.
> >
> > What we would need to be able to do is to trigger a dbus daemon-
reload
> > after the system user has been created and before the service is
started.
> >
> > Both is autogenerated code (via dh_installsysusers and
> > dh_installsystemd), and there is no way to inject maintscript code
> > manually unfortunately.
>
> One way to maybe address this is to make dh_installsysusers generate
> maintscript code to reload dbus.
> This could either be done unconditionally, via a dh_installsysusers
> option, or automatically when it finds a D-Bus config file shipped by
> the package (and referencing that user).
>
> dh_installsysusers is part of debhelper, so would need to be
addressed
> there.
We should finally switch the dh tools to use mark-and-sweep for
starting/stopping/restarting, instead of doing it inline, so that it
can be done once at the end with a trigger. Then we can order the
trigger between reloading dbus and starting units.
--
Kind regards,
Luca Boccassi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part
URL: <http://alioth-lists.debian.net/pipermail/pkg-systemd-maintainers/attachments/20240526/f962fb33/attachment.sig>
More information about the Pkg-systemd-maintainers
mailing list