Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 1 | From 98254e4798e79d52ac6b562616cd244120f6e239 Mon Sep 17 00:00:00 2001 |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 2 | From: Chen Qi <Qi.Chen@windriver.com> |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 3 | Date: Thu, 21 Feb 2019 16:23:24 +0800 |
| 4 | Subject: [PATCH 1/5] binfmt: Don't install dependency links at install time |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 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" it on install without static symlinks which can't be disabled, |
| 12 | only masked. We however can do that in a postinst. |
| 13 | |
| 14 | Upstream-Status: Denied |
| 15 | |
| 16 | Signed-off-by: Ross Burton <ross.burton@intel.com> |
| 17 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
| 18 | Signed-off-by: Chen Qi <Qi.Chen@windriver.com> |
Brad Bishop | a34c030 | 2019-09-23 22:34:48 -0400 | [diff] [blame] | 19 | [rebased for systemd 243] |
| 20 | Signed-off-by: Scott Murray <scott.murray@konsulko.com> |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 21 | --- |
| 22 | units/meson.build | 6 ++---- |
| 23 | units/proc-sys-fs-binfmt_misc.automount | 3 +++ |
| 24 | units/systemd-binfmt.service.in | 4 ++++ |
| 25 | 3 files changed, 9 insertions(+), 4 deletions(-) |
| 26 | |
| 27 | diff --git a/units/meson.build b/units/meson.build |
Brad Bishop | a34c030 | 2019-09-23 22:34:48 -0400 | [diff] [blame] | 28 | index e1ee9f86c3..6bb7771b36 100644 |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 29 | --- a/units/meson.build |
| 30 | +++ b/units/meson.build |
Brad Bishop | a34c030 | 2019-09-23 22:34:48 -0400 | [diff] [blame] | 31 | @@ -46,8 +46,7 @@ units = [ |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 32 | ['poweroff.target', '', |
| 33 | 'runlevel0.target'], |
| 34 | ['printer.target', ''], |
| 35 | - ['proc-sys-fs-binfmt_misc.automount', 'ENABLE_BINFMT', |
| 36 | - 'sysinit.target.wants/'], |
| 37 | + ['proc-sys-fs-binfmt_misc.automount', 'ENABLE_BINFMT'], |
| 38 | ['proc-sys-fs-binfmt_misc.mount', 'ENABLE_BINFMT'], |
| 39 | ['reboot.target', '', |
| 40 | 'runlevel6.target ctrl-alt-del.target'], |
Brad Bishop | a34c030 | 2019-09-23 22:34:48 -0400 | [diff] [blame] | 41 | @@ -130,8 +129,7 @@ in_units = [ |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 42 | ['systemd-ask-password-console.service', ''], |
| 43 | ['systemd-ask-password-wall.service', ''], |
| 44 | ['systemd-backlight@.service', 'ENABLE_BACKLIGHT'], |
| 45 | - ['systemd-binfmt.service', 'ENABLE_BINFMT', |
| 46 | - 'sysinit.target.wants/'], |
| 47 | + ['systemd-binfmt.service', 'ENABLE_BINFMT'], |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 48 | ['systemd-bless-boot.service', 'ENABLE_EFI HAVE_BLKID'], |
| 49 | ['systemd-boot-check-no-failures.service', ''], |
Brad Bishop | a34c030 | 2019-09-23 22:34:48 -0400 | [diff] [blame] | 50 | ['systemd-boot-system-token.service', 'ENABLE_EFI', |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 51 | diff --git a/units/proc-sys-fs-binfmt_misc.automount b/units/proc-sys-fs-binfmt_misc.automount |
Brad Bishop | a34c030 | 2019-09-23 22:34:48 -0400 | [diff] [blame] | 52 | index 30a6bc9918..4231f3b70f 100644 |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 53 | --- a/units/proc-sys-fs-binfmt_misc.automount |
| 54 | +++ b/units/proc-sys-fs-binfmt_misc.automount |
| 55 | @@ -18,3 +18,6 @@ ConditionPathIsReadWrite=/proc/sys/ |
| 56 | |
| 57 | [Automount] |
| 58 | Where=/proc/sys/fs/binfmt_misc |
| 59 | + |
| 60 | +[Install] |
| 61 | +WantedBy=sysinit.target |
| 62 | diff --git a/units/systemd-binfmt.service.in b/units/systemd-binfmt.service.in |
Brad Bishop | a34c030 | 2019-09-23 22:34:48 -0400 | [diff] [blame] | 63 | index e940c7c9ad..6be7f5cc9b 100644 |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 64 | --- a/units/systemd-binfmt.service.in |
| 65 | +++ b/units/systemd-binfmt.service.in |
| 66 | @@ -14,6 +14,7 @@ Documentation=https://www.kernel.org/doc/html/latest/admin-guide/binfmt-misc.htm |
| 67 | Documentation=https://www.freedesktop.org/wiki/Software/systemd/APIFileSystems |
| 68 | DefaultDependencies=no |
| 69 | Conflicts=shutdown.target |
| 70 | +Wants=proc-sys-fs-binfmt_misc.automount |
| 71 | After=proc-sys-fs-binfmt_misc.automount |
| 72 | Before=sysinit.target shutdown.target |
| 73 | ConditionPathIsReadWrite=/proc/sys/ |
| 74 | @@ -28,3 +29,6 @@ Type=oneshot |
| 75 | RemainAfterExit=yes |
| 76 | ExecStart=@rootlibexecdir@/systemd-binfmt |
| 77 | TimeoutSec=90s |
| 78 | + |
| 79 | +[Install] |
| 80 | +WantedBy=sysinit.target |