Mailinglist Archive: opensuse-bugs (4233 mails)

< Previous Next >
[Bug 1020301] dbus service restart in TW 20170112 update crashed sytemd-logind
  • From: bugzilla_noreply@xxxxxxxxxx
  • Date: Wed, 25 Jan 2017 08:51:23 +0000
  • Message-id: <bug-1020301-21960-kb4VhoBRiU@http.bugzilla.opensuse.org/>
http://bugzilla.opensuse.org/show_bug.cgi?id=1020301
http://bugzilla.opensuse.org/show_bug.cgi?id=1020301#c11

--- Comment #11 from Simon Lees <simonf.lees@xxxxxxxx> ---
(In reply to Martin Wilck from comment #7)
(In reply to Fabian Vogt from comment #5)
Best way would probably be to disable restarting dbus.service and
dbus.socket completely and only allow reloading.
This would also affect the %postun in turn. However, I have no idea how to
do that.

Like this, maybe?

%define _backup /etc/sysconfig/services.rpmbak.%{name}-%{version}-%{release}

%pre
if [[ "$FIRST_ARG" -gt 1 ]]; then
[...]
if [[ -f /etc/sysconfig/services ]]; then
cp -a /etc/sysconfig/services %{_backup}
else
touch %{_backup}
fi
cat >>/etc/sysconfig/services <<EOF
# temporarily added by rpm update to avoid dbus service restart
# backup saved in /etc/sysconfig/services.rpmbak.%{name}
DISABLE_RESTART_ON_UPDATE="yes"
EOF
fi

%posttrans
if [[ -s %{_backup} ]]; then
mv -f %{_backup} /etc/sysconfig/services
elif [[ -e %{_backup} ]]; then
rm -f /etc/sysconfig/services
fi

This is basically what I implemented in
https://build.opensuse.org/request/show/452341 you were pretty close but you
need a %global instead of a %define :-).

I have also added "export DISABLE_RESTART_ON_UPDATE=yes" to the postun so we
can drop the more complex code after everyone migrates to a newer version (the
service files were added in the last update which caused the issue)

(In reply to Dominique Leuenberger from comment #9)
RefuseManualStop=true might be an interesting option for the dbus.service

It is a interesting option so i've added it but it doesn't affect this case, it
doesn't block restarting a service only manually stopping.

--
You are receiving this mail because:
You are on the CC list for the bug.
< Previous Next >
References