This makes sure that systemd-sysusers was executed as well as
systemd-tmpfiles to setup proper permissions for /var/log/journal before
systemd-journald is being restarted.
dh_installsysusers adds a systemd-sysusers in #DEBHELPER#. Otherwise
it fails with:
/usr/lib/tmpfiles.d/systemd.conf:28: Failed to resolve group 'systemd-journal'.
Regression of fa0aade329.
Closes: #1023248
Remove the dpkg file trigger which called systemctl daemon-reload whenever
a SysV init script was installed. We have proper support in debhelper
nowadays which makes this superfluous and we want to avoid unnecessary
systemctl daemon-reload calls.
We can't restart the socket while systemd-networkd.service is still
active. Instead we stop the socket and ensure, that a try-restart of
systemd-networkd.service also starts the socket.
The new systemd-timesyncd package conflicting with other NTP-related
packages resolves the problems arising when installing systemd-timesyncd
and other NTP servers on the same system.
Co-authored-by: Michael Biebl <biebl@debian.org>
LP: #1849156Closes: #805927, #947936
Applying ACLs on /var/log/journal via systemd-tmpfiles requires a
mounted /proc. Skip this step if /proc is not available, e.g. in a
chroot.
Closes: #950533
We need to use $@ instead of "$@" so we can iterate through the
individual trigger names which are passed as a space separated list in
the second argument.
Some systemd versions have DynamicUser=yes in systemd-timesyncd.service.
adduser does not consider these high UIDs as system user and fails,
which caused package installation failures.
Otherwise timesyncd will fail to update the clock file if it was created
as /var/lib/private/systemd/timesync/clock.
This was the case when the service was using DynamicUser=yes which it no
longer does in v240.
Closes: #918190
Fix our make-sysusers-basic sysusers.d generator to special-case the
nobody group. "nobody" user and "nogroup" group both have the same ID
65534, which is the only special case for Debian's static users/groups.
So specify the gid explicitly, to avoid systemd-sysusers creating a
dynamic system group for "nobody".
Also clean up the group on upgrades.
Thanks to Keh-Ming Luoh for the original patch!
Closes: #912525
If libnss-systemd is active and the service running, adduser will fail
to create a static system user for it:
adduser: The user `systemd-timesync' already exists, but is not a system user. Exiting.
Follow-up for commit bd9bf30727
Gbp-Dch: Ignore
There are currently too many open issues related to D-Bus and the usage
of DynamicUser.
This reverts commit 4a1eb53f52,
commit f786e808ea and partially also
commit 83ccb63f86.
Closes: #902971
This was done so changes to the [Install] section would be applied on
upgrades. Forcefully re-enabling a service might overwrite local
modifications though and thus far, none of the affected services did
actually change its [Install] section. So remove this code from the
maintainer scripts as it was apparently doing more harm then good.
Closes: #869354
systemd-bus-proxy hasn't been shipped since before stretch and never
created any files. Thus clean up the obsolete system user on upgrades.
Closes: #878182
Stop testing for specific versions. This is no longer necessary as even
the versions in jessie satisfy those requirements.
Also, run the code on upgrades only. Trying to do that on new installs
(even if there is state from a removed but not purged systemd package)
is rather pointless, as systemctl will not be available at this point.
Instead run the code only on new installations. There might still be
cases where users migrate from sysvinit to systemd, so we don't want to
drop it yet.
This does not fix the root cause of the reload failures, but at least causes
fewer packages to be in a broken state after upgrade, so that a reboot or
apt-get -f install have a much higher chance in succeeding.
This is more defensive against bugs like https://launchpad.net/bugs/1502097https://launchpad.net/bugs/1447654.