summaryrefslogtreecommitdiffstats
path: root/debian/patches/data-Fix-indirect-conflict-with-exit.target-via-app.slice.patch
blob: 385a7daa8857cf45497206563a13fed6f8b6381e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
From: Benjamin Berg <bberg@redhat.com>
Date: Thu, 3 Dec 2020 13:45:36 +0100
Subject: data: Fix indirect conflict with exit.target via app.slice

systemd v247 now puts services into app.slice by default. But app.slice
will have a conflict with exit.target, which in turn means that we still
get a conflict with exit.target indirectly.

Fix it by adding the appropriate Slice=-.slice into
gnome-session-restart-dbus.service. Also update the note in
gnome-session-shutdown.service to point out the requirements.

Bug: https://gitlab.gnome.org/GNOME/gnome-session/-/issues/74
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=975400
Origin: upstream, 40, commit:9de6e40f12e8878f524f8d429d85724c156a0517
---
 data/gnome-session-restart-dbus.service.in | 5 +++--
 data/gnome-session-shutdown.target         | 5 +++--
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/data/gnome-session-restart-dbus.service.in b/data/gnome-session-restart-dbus.service.in
index e90f6bc..6389c32 100644
--- a/data/gnome-session-restart-dbus.service.in
+++ b/data/gnome-session-restart-dbus.service.in
@@ -1,10 +1,11 @@
 [Unit]
 Description=Restart DBus after GNOME Session shutdown
 
-# Allow exit.target to start even if this unit is started with replace-irreversibly
-# Also put it into a slice that doesn't have such implicit dependencies
+# Allow exit.target to start even if this unit is started with replace-irreversibly.
+# For this to work, we also need to be in the root slice.
 DefaultDependencies=no
 
 [Service]
 Type=notify
 ExecStart=@libexecdir@/gnome-session-ctl --restart-dbus
+Slice=-.slice
diff --git a/data/gnome-session-shutdown.target b/data/gnome-session-shutdown.target
index 607dc6e..2c3d196 100644
--- a/data/gnome-session-shutdown.target
+++ b/data/gnome-session-shutdown.target
@@ -1,8 +1,9 @@
 [Unit]
 Description=Shutdown running GNOME Session
 
-# Allow exit.target to start even if this unit is started with replace-irreversibly
-# The same is needed for all (weak) dependencies
+# Allow exit.target to start even if this unit is started with replace-irreversibly.
+# All (weak) dependencies need to do the same. Services also need to ensure they
+# are in the root slice by setting Slice=-.slice.
 DefaultDependencies=no
 
 Conflicts=graphical-session.target graphical-session-pre.target