summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/systemd/systemd/0001-binfmt-Don-t-install-dependency-links-at-install-tim.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-core/systemd/systemd/0001-binfmt-Don-t-install-dependency-links-at-install-tim.patch')
-rw-r--r--meta/recipes-core/systemd/systemd/0001-binfmt-Don-t-install-dependency-links-at-install-tim.patch81
1 files changed, 81 insertions, 0 deletions
diff --git a/meta/recipes-core/systemd/systemd/0001-binfmt-Don-t-install-dependency-links-at-install-tim.patch b/meta/recipes-core/systemd/systemd/0001-binfmt-Don-t-install-dependency-links-at-install-tim.patch
new file mode 100644
index 0000000000..e24e7f83fc
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/0001-binfmt-Don-t-install-dependency-links-at-install-tim.patch
@@ -0,0 +1,81 @@
1From 87dd61be2e28e78ce4f9f173794812e6c2d904d1 Mon Sep 17 00:00:00 2001
2From: Chen Qi <Qi.Chen@windriver.com>
3Date: Wed, 27 Jun 2018 16:01:22 +0800
4Subject: [PATCH 1/9] binfmt: Don't install dependency links at install time
5 for the binfmt services
6
7use [Install] blocks so that they get created when the service is enabled
8like a traditional service.
9
10The [Install] blocks were rejected upstream as they don't have a way to
11"enable" it on install without static symlinks which can't be disabled,
12only masked. We however can do that in a postinst.
13
14Upstream-Status: Denied
15
16Signed-off-by: Ross Burton <ross.burton@intel.com>
17Signed-off-by: Khem Raj <raj.khem@gmail.com>
18Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
19---
20 units/meson.build | 6 ++----
21 units/proc-sys-fs-binfmt_misc.automount | 3 +++
22 units/systemd-binfmt.service.in | 4 ++++
23 3 files changed, 9 insertions(+), 4 deletions(-)
24
25diff --git a/units/meson.build b/units/meson.build
26index e4ac6ced6..698734e44 100644
27--- a/units/meson.build
28+++ b/units/meson.build
29@@ -46,8 +46,7 @@ units = [
30 ['poweroff.target', '',
31 'runlevel0.target'],
32 ['printer.target', ''],
33- ['proc-sys-fs-binfmt_misc.automount', 'ENABLE_BINFMT',
34- 'sysinit.target.wants/'],
35+ ['proc-sys-fs-binfmt_misc.automount', 'ENABLE_BINFMT'],
36 ['proc-sys-fs-binfmt_misc.mount', 'ENABLE_BINFMT'],
37 ['reboot.target', '',
38 'runlevel6.target ctrl-alt-del.target'],
39@@ -130,8 +129,7 @@ in_units = [
40 ['systemd-ask-password-console.service', ''],
41 ['systemd-ask-password-wall.service', ''],
42 ['systemd-backlight@.service', 'ENABLE_BACKLIGHT'],
43- ['systemd-binfmt.service', 'ENABLE_BINFMT',
44- 'sysinit.target.wants/'],
45+ ['systemd-binfmt.service', 'ENABLE_BINFMT'],
46 ['systemd-coredump@.service', 'ENABLE_COREDUMP'],
47 ['systemd-exit.service', ''],
48 ['systemd-firstboot.service', 'ENABLE_FIRSTBOOT',
49diff --git a/units/proc-sys-fs-binfmt_misc.automount b/units/proc-sys-fs-binfmt_misc.automount
50index 30a6bc991..4231f3b70 100644
51--- a/units/proc-sys-fs-binfmt_misc.automount
52+++ b/units/proc-sys-fs-binfmt_misc.automount
53@@ -18,3 +18,6 @@ ConditionPathIsReadWrite=/proc/sys/
54
55 [Automount]
56 Where=/proc/sys/fs/binfmt_misc
57+
58+[Install]
59+WantedBy=sysinit.target
60diff --git a/units/systemd-binfmt.service.in b/units/systemd-binfmt.service.in
61index e940c7c9a..6be7f5cc9 100644
62--- a/units/systemd-binfmt.service.in
63+++ b/units/systemd-binfmt.service.in
64@@ -14,6 +14,7 @@ Documentation=https://www.kernel.org/doc/html/latest/admin-guide/binfmt-misc.htm
65 Documentation=https://www.freedesktop.org/wiki/Software/systemd/APIFileSystems
66 DefaultDependencies=no
67 Conflicts=shutdown.target
68+Wants=proc-sys-fs-binfmt_misc.automount
69 After=proc-sys-fs-binfmt_misc.automount
70 Before=sysinit.target shutdown.target
71 ConditionPathIsReadWrite=/proc/sys/
72@@ -28,3 +29,6 @@ Type=oneshot
73 RemainAfterExit=yes
74 ExecStart=@rootlibexecdir@/systemd-binfmt
75 TimeoutSec=90s
76+
77+[Install]
78+WantedBy=sysinit.target
79--
802.11.0
81