summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/systemd/systemd/0002-binfmt-Don-t-install-dependency-links-at-install-tim.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-core/systemd/systemd/0002-binfmt-Don-t-install-dependency-links-at-install-tim.patch')
-rw-r--r--meta/recipes-core/systemd/systemd/0002-binfmt-Don-t-install-dependency-links-at-install-tim.patch79
1 files changed, 79 insertions, 0 deletions
diff --git a/meta/recipes-core/systemd/systemd/0002-binfmt-Don-t-install-dependency-links-at-install-tim.patch b/meta/recipes-core/systemd/systemd/0002-binfmt-Don-t-install-dependency-links-at-install-tim.patch
new file mode 100644
index 0000000000..be231cf6b2
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/0002-binfmt-Don-t-install-dependency-links-at-install-tim.patch
@@ -0,0 +1,79 @@
1From 29a58009a172e369ad7166e16dab2f4945c6b0d2 Mon Sep 17 00:00:00 2001
2From: Chen Qi <Qi.Chen@windriver.com>
3Date: Thu, 21 Feb 2019 16:23:24 +0800
4Subject: [PATCH 1/2] 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[rebased for systemd 243]
20Signed-off-by: Scott Murray <scott.murray@konsulko.com>
21---
22 units/meson.build | 2 --
23 units/proc-sys-fs-binfmt_misc.automount | 3 +++
24 units/systemd-binfmt.service.in | 4 ++++
25 3 files changed, 7 insertions(+), 2 deletions(-)
26
27diff --git a/units/meson.build b/units/meson.build
28index e7bfb7f838..1d5ec4b178 100644
29--- a/units/meson.build
30+++ b/units/meson.build
31@@ -154,7 +154,6 @@ units = [
32 {
33 'file' : 'proc-sys-fs-binfmt_misc.automount',
34 'conditions' : ['ENABLE_BINFMT'],
35- 'symlinks' : ['sysinit.target.wants/'],
36 },
37 {
38 'file' : 'proc-sys-fs-binfmt_misc.mount',
39@@ -251,7 +250,6 @@ units = [
40 {
41 'file' : 'systemd-binfmt.service.in',
42 'conditions' : ['ENABLE_BINFMT'],
43- 'symlinks' : ['sysinit.target.wants/'],
44 },
45 {
46 'file' : 'systemd-bless-boot.service.in',
47diff --git a/units/proc-sys-fs-binfmt_misc.automount b/units/proc-sys-fs-binfmt_misc.automount
48index 5d212015a5..6c2900ca77 100644
49--- a/units/proc-sys-fs-binfmt_misc.automount
50+++ b/units/proc-sys-fs-binfmt_misc.automount
51@@ -22,3 +22,6 @@ Before=shutdown.target
52
53 [Automount]
54 Where=/proc/sys/fs/binfmt_misc
55+
56+[Install]
57+WantedBy=sysinit.target
58diff --git a/units/systemd-binfmt.service.in b/units/systemd-binfmt.service.in
59index 6861c76674..531e9fbd90 100644
60--- a/units/systemd-binfmt.service.in
61+++ b/units/systemd-binfmt.service.in
62@@ -14,6 +14,7 @@ Documentation=https://docs.kernel.org/admin-guide/binfmt-misc.html
63 Documentation=https://www.freedesktop.org/wiki/Software/systemd/APIFileSystems
64 DefaultDependencies=no
65 Conflicts=shutdown.target
66+Wants=proc-sys-fs-binfmt_misc.automount
67 After=proc-sys-fs-binfmt_misc.automount
68 After=proc-sys-fs-binfmt_misc.mount
69 After=local-fs.target
70@@ -31,3 +32,6 @@ RemainAfterExit=yes
71 ExecStart={{LIBEXECDIR}}/systemd-binfmt
72 ExecStop={{LIBEXECDIR}}/systemd-binfmt --unregister
73 TimeoutSec=90s
74+
75+[Install]
76+WantedBy=sysinit.target
77--
782.34.1
79