blob: 0e20fd054875a13661debdf0c05a7c07d2a668f9 [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001From 184a89caacfa00f07e7275bca592bd7dda1b541e Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 20 Feb 2015 05:03:44 +0000
4Subject: [PATCH 03/11] 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"
12it on install without static symlinks which can't be disabled, only
13masked. We
14however can do that in a postinst.
15
16Upstream-Status: Denied
17
18Signed-off-by: Ross Burton <ross.burton@intel.com>
19Signed-off-by: Khem Raj <raj.khem@gmail.com>
20---
21 Makefile.am | 4 ----
22 units/proc-sys-fs-binfmt_misc.automount | 3 +++
23 units/systemd-binfmt.service.in | 5 +++++
24 3 files changed, 8 insertions(+), 4 deletions(-)
25
26Index: git/Makefile.am
27===================================================================
28--- git.orig/Makefile.am
29+++ git/Makefile.am
30@@ -4271,10 +4271,6 @@ INSTALL_DIRS += \
31 $(prefix)/lib/binfmt.d \
32 $(sysconfdir)/binfmt.d
33
34-SYSINIT_TARGET_WANTS += \
35- systemd-binfmt.service \
36- proc-sys-fs-binfmt_misc.automount
37-
38 endif
39
40 EXTRA_DIST += \
41Index: git/units/proc-sys-fs-binfmt_misc.automount
42===================================================================
43--- git.orig/units/proc-sys-fs-binfmt_misc.automount
44+++ git/units/proc-sys-fs-binfmt_misc.automount
45@@ -16,3 +16,6 @@ ConditionPathIsReadWrite=/proc/sys/
46
47 [Automount]
48 Where=/proc/sys/fs/binfmt_misc
49+
50+[Install]
51+WantedBy=sysinit.target
52Index: git/units/systemd-binfmt.service.in
53===================================================================
54--- git.orig/units/systemd-binfmt.service.in
55+++ git/units/systemd-binfmt.service.in
56@@ -11,6 +11,8 @@ Documentation=man:systemd-binfmt.service
57 Documentation=https://www.kernel.org/doc/Documentation/binfmt_misc.txt
58 DefaultDependencies=no
59 Conflicts=shutdown.target
60+Wants=proc-sys-fs-binfmt_misc.automount
61+
62 After=proc-sys-fs-binfmt_misc.automount
63 Before=sysinit.target shutdown.target
64 ConditionPathIsReadWrite=/proc/sys/
65@@ -25,3 +27,6 @@ Type=oneshot
66 RemainAfterExit=yes
67 ExecStart=@rootlibexecdir@/systemd-binfmt
68 TimeoutSec=90s
69+
70+[Install]
71+WantedBy=sysinit.target