summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/systemd/systemd/binfmt-install.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-core/systemd/systemd/binfmt-install.patch')
-rw-r--r--meta/recipes-core/systemd/systemd/binfmt-install.patch51
1 files changed, 51 insertions, 0 deletions
diff --git a/meta/recipes-core/systemd/systemd/binfmt-install.patch b/meta/recipes-core/systemd/systemd/binfmt-install.patch
new file mode 100644
index 0000000000..891c712173
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/binfmt-install.patch
@@ -0,0 +1,51 @@
1Don't install dependency links at install time for the binfmt services, use
2[Install] blocks so that they get created when the service is enabled.
3
4Upstream-Status: Inappropriate(Makefile.am) / Submitted(units/)
5Signed-off-by: Ross Burton <ross.burton@intel.com>
6
7diff --git a/Makefile.am b/Makefile.am
8index 7933de6..78acb6f 100644
9--- a/Makefile.am
10+++ b/Makefile.am
11@@ -3133,10 +3133,6 @@ INSTALL_DIRS += \
12 $(prefix)/lib/binfmt.d \
13 $(sysconfdir)/binfmt.d
14
15-SYSINIT_TARGET_WANTS += \
16- systemd-binfmt.service \
17- proc-sys-fs-binfmt_misc.automount
18-
19 endif
20
21 EXTRA_DIST += \
22diff --git a/units/proc-sys-fs-binfmt_misc.automount b/units/proc-sys-fs-binfmt_misc.automount
23index 6be3893..709adef 100644
24--- a/units/proc-sys-fs-binfmt_misc.automount
25+++ b/units/proc-sys-fs-binfmt_misc.automount
26@@ -16,3 +16,6 @@ ConditionPathIsReadWrite=/proc/sys/
27
28 [Automount]
29 Where=/proc/sys/fs/binfmt_misc
30+
31+[Install]
32+WantedBy=sysinit.target
33diff --git a/units/systemd-binfmt.service.in b/units/systemd-binfmt.service.in
34index 02dfe77..86d3481 100644
35--- a/units/systemd-binfmt.service.in
36+++ b/units/systemd-binfmt.service.in
37@@ -11,6 +11,7 @@ Documentation=man:systemd-binfmt.service(8) man:binfmt.d(5)
38 Documentation=https://www.kernel.org/doc/Documentation/binfmt_misc.txt
39 DefaultDependencies=no
40 Conflicts=shutdown.target
41+Wants=proc-sys-fs-binfmt_misc.automount
42 After=systemd-readahead-collect.service systemd-readahead-replay.service proc-sys-fs-binfmt_misc.automount
43 Before=sysinit.target shutdown.target
44 ConditionPathIsReadWrite=/proc/sys/
45@@ -24,3 +25,6 @@ ConditionDirectoryNotEmpty=|/run/binfmt.d
46 Type=oneshot
47 RemainAfterExit=yes
48 ExecStart=@rootlibexecdir@/systemd-binfmt
49+
50+[Install]
51+WantedBy=sysinit.target