aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/systemd/systemd
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@intel.com>2013-09-06 15:44:14 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-09-06 23:01:52 +0100
commitd42f7fc333495dc35227a6d1027492ab70f29b23 (patch)
tree14e09a4c5e4288d2d36203c16c012cd93587c53f /meta/recipes-core/systemd/systemd
parentc0551436974d179df23418567f18a082830380f6 (diff)
downloadopenembedded-core-contrib-d42f7fc333495dc35227a6d1027492ab70f29b23.tar.gz
systemd: split out systemd-binfmt as a separate package
If binfmt_misc was compiled as a module but isn't installed then systemd-binfmt will put an automounter on /proc/sys/fs/binfmt_misc and when it attempts to automount (e.g. when df is called) it can't find support for the filesystem, and throws an error. As binfmt_misc isn't commonly used, split this helper into it's own package, add a dependency on kernel-module-binfmt-misc, and ensure the service gets started when it's installed. [ YOCTO #4863 ] Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/systemd/systemd')
-rw-r--r--meta/recipes-core/systemd/systemd/binfmt-install.patch51
1 files changed, 51 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..891c712173
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/binfmt-install.patch
@@ -0,0 +1,51 @@
+Don't install dependency links at install time for the binfmt services, use
+[Install] blocks so that they get created when the service is enabled.
+
+Upstream-Status: Inappropriate(Makefile.am) / Submitted(units/)
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+diff --git a/Makefile.am b/Makefile.am
+index 7933de6..78acb6f 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -3133,10 +3133,6 @@ INSTALL_DIRS += \
+ $(prefix)/lib/binfmt.d \
+ $(sysconfdir)/binfmt.d
+
+-SYSINIT_TARGET_WANTS += \
+- systemd-binfmt.service \
+- proc-sys-fs-binfmt_misc.automount
+-
+ endif
+
+ EXTRA_DIST += \
+diff --git a/units/proc-sys-fs-binfmt_misc.automount b/units/proc-sys-fs-binfmt_misc.automount
+index 6be3893..709adef 100644
+--- a/units/proc-sys-fs-binfmt_misc.automount
++++ b/units/proc-sys-fs-binfmt_misc.automount
+@@ -16,3 +16,6 @@ ConditionPathIsReadWrite=/proc/sys/
+
+ [Automount]
+ Where=/proc/sys/fs/binfmt_misc
++
++[Install]
++WantedBy=sysinit.target
+diff --git a/units/systemd-binfmt.service.in b/units/systemd-binfmt.service.in
+index 02dfe77..86d3481 100644
+--- a/units/systemd-binfmt.service.in
++++ b/units/systemd-binfmt.service.in
+@@ -11,6 +11,7 @@ Documentation=man:systemd-binfmt.service(8) man:binfmt.d(5)
+ Documentation=https://www.kernel.org/doc/Documentation/binfmt_misc.txt
+ DefaultDependencies=no
+ Conflicts=shutdown.target
++Wants=proc-sys-fs-binfmt_misc.automount
+ After=systemd-readahead-collect.service systemd-readahead-replay.service proc-sys-fs-binfmt_misc.automount
+ Before=sysinit.target shutdown.target
+ ConditionPathIsReadWrite=/proc/sys/
+@@ -24,3 +25,6 @@ ConditionDirectoryNotEmpty=|/run/binfmt.d
+ Type=oneshot
+ RemainAfterExit=yes
+ ExecStart=@rootlibexecdir@/systemd-binfmt
++
++[Install]
++WantedBy=sysinit.target