Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1 | From 184a89caacfa00f07e7275bca592bd7dda1b541e Mon Sep 17 00:00:00 2001 |
| 2 | From: Khem Raj <raj.khem@gmail.com> |
| 3 | Date: Fri, 20 Feb 2015 05:03:44 +0000 |
| 4 | Subject: [PATCH 03/11] binfmt: Don't install dependency links at install time |
| 5 | for the binfmt services |
| 6 | |
| 7 | use [Install] blocks so that they get created when the service is enabled |
| 8 | like a traditional service. |
| 9 | |
| 10 | The [Install] blocks were rejected upstream as they don't have a way to |
| 11 | "enable" |
| 12 | it on install without static symlinks which can't be disabled, only |
| 13 | masked. We |
| 14 | however can do that in a postinst. |
| 15 | |
| 16 | Upstream-Status: Denied |
| 17 | |
| 18 | Signed-off-by: Ross Burton <ross.burton@intel.com> |
| 19 | Signed-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 | |
| 26 | Index: 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 += \ |
| 41 | Index: 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 |
| 52 | Index: 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 |