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.patch56
1 files changed, 56 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..c2d5099f24
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/binfmt-install.patch
@@ -0,0 +1,56 @@
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 like a
3traditional service.
4
5The [Install] blocks were rejected upstream as they don't have a way to "enable"
6it on install without static symlinks which can't be disabled, only masked. We
7however can do that in a postinst.
8
9Upstream-Status: Denied
10Signed-off-by: Ross Burton <ross.burton@intel.com>
11
12diff --git a/Makefile.am b/Makefile.am
13index 7933de6..78acb6f 100644
14--- a/Makefile.am
15+++ b/Makefile.am
16@@ -3133,10 +3133,6 @@ INSTALL_DIRS += \
17 $(prefix)/lib/binfmt.d \
18 $(sysconfdir)/binfmt.d
19
20-SYSINIT_TARGET_WANTS += \
21- systemd-binfmt.service \
22- proc-sys-fs-binfmt_misc.automount
23-
24 endif
25
26 EXTRA_DIST += \
27diff --git a/units/proc-sys-fs-binfmt_misc.automount b/units/proc-sys-fs-binfmt_misc.automount
28index 6be3893..709adef 100644
29--- a/units/proc-sys-fs-binfmt_misc.automount
30+++ b/units/proc-sys-fs-binfmt_misc.automount
31@@ -16,3 +16,6 @@ ConditionPathIsReadWrite=/proc/sys/
32
33 [Automount]
34 Where=/proc/sys/fs/binfmt_misc
35+
36+[Install]
37+WantedBy=sysinit.target
38diff --git a/units/systemd-binfmt.service.in b/units/systemd-binfmt.service.in
39index 02dfe77..86d3481 100644
40--- a/units/systemd-binfmt.service.in
41+++ b/units/systemd-binfmt.service.in
42@@ -11,6 +11,7 @@ Documentation=man:systemd-binfmt.service(8) man:binfmt.d(5)
43 Documentation=https://www.kernel.org/doc/Documentation/binfmt_misc.txt
44 DefaultDependencies=no
45 Conflicts=shutdown.target
46+Wants=proc-sys-fs-binfmt_misc.automount
47 After=systemd-readahead-collect.service systemd-readahead-replay.service proc-sys-fs-binfmt_misc.automount
48 Before=sysinit.target shutdown.target
49 ConditionPathIsReadWrite=/proc/sys/
50@@ -24,3 +25,6 @@ ConditionDirectoryNotEmpty=|/run/binfmt.d
51 Type=oneshot
52 RemainAfterExit=yes
53 ExecStart=@rootlibexecdir@/systemd-binfmt
54+
55+[Install]
56+WantedBy=sysinit.target