Hi, Michael Biebl writes:
> Am 11.05.2018 um 08:10 schrieb Meeuwissen Olaf: >> Hi, >> >> Thanks for the quick follow-up. >> >> Michael Biebl writes: >> >>> Control: tags -1 + moreinfo >>> >>>> I have set up unattended-upgrades to reboot my machine at 04:00 when >>>> necessary. Internally, unattended-upgrades runs >>>> >>>> /sbin/shutdown -r 04:00 >>>> >>>> trying to achieve this. This fails as evidenced by these (dated) log >>>> messages >>>> >>>> Apr 25 06:55:18 easy apt.systemd.daily[38369]: Found >>>> /var/run/reboot-required, rebooting >>>> Apr 25 06:55:18 easy apt.systemd.daily[38369]: Failed to connect to bus: >>>> No such file or directory >>> >>> What's the output of >>> systemctl status dbus.socket dbus.service systemd-logind.service >> >> $ sudo systemctl status dbus.socket dbus.service systemd-logind.service >> Unit dbus.socket could not be found. >> Unit dbus.service could not be found. >> * systemd-logind.service - Login Service >> Loaded: loaded (/lib/systemd/system/systemd-logind.service; static; >> vendor preset: enabled) >> Active: inactive (dead) >> Condition: start condition failed at Fri 2018-05-11 04:00:25 JST; 10h ago >> `- ConditionPathExists=/lib/systemd/system/dbus.service was not >> met >> Docs: man:systemd-logind.service(8) >> man:logind.conf(5) >> http://www.freedesktop.org/wiki/Software/systemd/logind >> http://www.freedesktop.org/wiki/Software/systemd/multiseat >> >> Yes, I don't have dbus installed. Nothing I have installed has a >> dependency on it that is Depends: or more important. I don't install >> Recommends: and actively remove them unless other installed packages >> declare a (Pre-)Depends: >> >> Based on my understanding of the relevant section[1] in the Debian >> Policy, I would argue that systemd-sysv needs a Depends: dbus. >> >> [1]: >> https://www.debian.org/doc/debian-policy/#binary-dependencies-depends-recommends-suggests-enhances-pre-depends >> >> The Recommends: that systemd declares looks fine as I have not observed >> any other breakage. >> >> FTR, after I install dbus, I get >> >> $ sudo shutdown -r 04:00 >> Shutdown scheduled for Sat 2018-05-12 04:00:00 JST, use 'shutdown -c' to >> cancel. >> > > Scheduled shutdowns require systemd-logind, which in turn requires > dbus. In my initial bug report I included root@debian:~$ shutdown -r 04:00 Failed to connect to bus: No such file or directory root@debian:~$ shutdown -r Failed to connect to bus: No such file or directory root@debian:~$ shutdown Failed to connect to bus: No such file or directory What is scheduled about the last two commands? The implicit "now"? The reboot command, also provided by systemd-sysv, works *without* dbus installed. So do the halt and poweroff commands. The only thing login related I could find in the shutdown manual page is the creating of a /run/nologin file in case a timespec is given. > The basic functionality of systemd does not strictly require dbus > though. This pretty much fits the bill for recommends and we want to > allow (at least for the time being), to not have dbus installed, even if > this means, that certain functionality in systemd is then not available. > This is a choice the admin has to make. And I agreed that the Recommends: dbus for systemd is fine. I said that I thought that systemd-sysv needs a Depends: because the absence of dbus breaks the shutdown command *completely*. # OK, so invoking it with the --help option works. Great! I would think completely breaking the shutdown command meets The Depends field should be used if the depended-on package is required for the depending package to provide a significant amount of functionality. unless you want to argue that shutdown is not a significant amount of functionality provided by systemd-sysv. Seeing that systemd does not depend on systemd-sysv, adding the dbus dependency to systemd-sysv will not introduce a dbus dependency for systemd itself. > If you choose to not install dbus, then you can't use logind (and as > such scheduled shutdowns). > > So everything is behaving as expected. Definitely not from my POV. I'm off now installing dbus myself because systemd-sysv didn't think it important enough to do that for me :-( Hope this helps, -- Olaf Meeuwissen, LPIC-2 FLOSS Engineer -- EPSON AVASYS CORPORATION Free Software Foundation Associate Member since 2004-01-27 Support Free Software https://my.fsf.org/donate Join the Free Software Foundation https://my.fsf.org/join