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> |
| 19 | --- |
| 20 | units/meson.build | 6 ++---- |
| 21 | units/proc-sys-fs-binfmt_misc.automount | 3 +++ |
| 22 | units/systemd-binfmt.service.in | 4 ++++ |
| 23 | 3 files changed, 9 insertions(+), 4 deletions(-) |
| 24 | |
| 25 | diff --git a/units/meson.build b/units/meson.build |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame^] | 26 | index d695084..7b1f14a 100644 |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 27 | --- a/units/meson.build |
| 28 | +++ b/units/meson.build |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame^] | 29 | @@ -47,8 +47,7 @@ units = [ |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 30 | ['poweroff.target', '', |
| 31 | 'runlevel0.target'], |
| 32 | ['printer.target', ''], |
| 33 | - ['proc-sys-fs-binfmt_misc.automount', 'ENABLE_BINFMT', |
| 34 | - 'sysinit.target.wants/'], |
| 35 | + ['proc-sys-fs-binfmt_misc.automount', 'ENABLE_BINFMT'], |
| 36 | ['proc-sys-fs-binfmt_misc.mount', 'ENABLE_BINFMT'], |
| 37 | ['reboot.target', '', |
| 38 | 'runlevel6.target ctrl-alt-del.target'], |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame^] | 39 | @@ -134,8 +133,7 @@ in_units = [ |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 40 | ['systemd-ask-password-console.service', ''], |
| 41 | ['systemd-ask-password-wall.service', ''], |
| 42 | ['systemd-backlight@.service', 'ENABLE_BACKLIGHT'], |
| 43 | - ['systemd-binfmt.service', 'ENABLE_BINFMT', |
| 44 | - 'sysinit.target.wants/'], |
| 45 | + ['systemd-binfmt.service', 'ENABLE_BINFMT'], |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame^] | 46 | ['systemd-bless-boot.service', 'ENABLE_EFI HAVE_BLKID'], |
| 47 | ['systemd-boot-check-no-failures.service', ''], |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 48 | ['systemd-coredump@.service', 'ENABLE_COREDUMP'], |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 49 | diff --git a/units/proc-sys-fs-binfmt_misc.automount b/units/proc-sys-fs-binfmt_misc.automount |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame^] | 50 | index 30a6bc9..4231f3b 100644 |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 51 | --- a/units/proc-sys-fs-binfmt_misc.automount |
| 52 | +++ b/units/proc-sys-fs-binfmt_misc.automount |
| 53 | @@ -18,3 +18,6 @@ ConditionPathIsReadWrite=/proc/sys/ |
| 54 | |
| 55 | [Automount] |
| 56 | Where=/proc/sys/fs/binfmt_misc |
| 57 | + |
| 58 | +[Install] |
| 59 | +WantedBy=sysinit.target |
| 60 | diff --git a/units/systemd-binfmt.service.in b/units/systemd-binfmt.service.in |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame^] | 61 | index e940c7c..6be7f5c 100644 |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 62 | --- a/units/systemd-binfmt.service.in |
| 63 | +++ b/units/systemd-binfmt.service.in |
| 64 | @@ -14,6 +14,7 @@ Documentation=https://www.kernel.org/doc/html/latest/admin-guide/binfmt-misc.htm |
| 65 | Documentation=https://www.freedesktop.org/wiki/Software/systemd/APIFileSystems |
| 66 | DefaultDependencies=no |
| 67 | Conflicts=shutdown.target |
| 68 | +Wants=proc-sys-fs-binfmt_misc.automount |
| 69 | After=proc-sys-fs-binfmt_misc.automount |
| 70 | Before=sysinit.target shutdown.target |
| 71 | ConditionPathIsReadWrite=/proc/sys/ |
| 72 | @@ -28,3 +29,6 @@ Type=oneshot |
| 73 | RemainAfterExit=yes |
| 74 | ExecStart=@rootlibexecdir@/systemd-binfmt |
| 75 | TimeoutSec=90s |
| 76 | + |
| 77 | +[Install] |
| 78 | +WantedBy=sysinit.target |
| 79 | -- |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame^] | 80 | 2.7.4 |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 81 | |