summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core
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:04:51 +0100
commit76e8678c2fc7870719f3be516b5c323a631374a9 (patch)
tree1ef83c9558ac2e3732de5e3754f9cd610f33f5b9 /meta/recipes-core
parent9b84fc7cc2a9100685e78a5fe051b3a7be5a540a (diff)
downloadpoky-76e8678c2fc7870719f3be516b5c323a631374a9.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 ] (From OE-Core rev: d42f7fc333495dc35227a6d1027492ab70f29b23) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core')
-rw-r--r--meta/recipes-core/systemd/systemd/binfmt-install.patch51
-rw-r--r--meta/recipes-core/systemd/systemd_206.bb17
2 files changed, 64 insertions, 4 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 @@
1Don't install dependency links at install time for the binfmt services, use
2[Install] blocks so that they get created when the service is enabled.
3
4Upstream-Status: Inappropriate(Makefile.am) / Submitted(units/)
5Signed-off-by: Ross Burton <ross.burton@intel.com>
6
7diff --git a/Makefile.am b/Makefile.am
8index 7933de6..78acb6f 100644
9--- a/Makefile.am
10+++ b/Makefile.am
11@@ -3133,10 +3133,6 @@ INSTALL_DIRS += \
12 $(prefix)/lib/binfmt.d \
13 $(sysconfdir)/binfmt.d
14
15-SYSINIT_TARGET_WANTS += \
16- systemd-binfmt.service \
17- proc-sys-fs-binfmt_misc.automount
18-
19 endif
20
21 EXTRA_DIST += \
22diff --git a/units/proc-sys-fs-binfmt_misc.automount b/units/proc-sys-fs-binfmt_misc.automount
23index 6be3893..709adef 100644
24--- a/units/proc-sys-fs-binfmt_misc.automount
25+++ b/units/proc-sys-fs-binfmt_misc.automount
26@@ -16,3 +16,6 @@ ConditionPathIsReadWrite=/proc/sys/
27
28 [Automount]
29 Where=/proc/sys/fs/binfmt_misc
30+
31+[Install]
32+WantedBy=sysinit.target
33diff --git a/units/systemd-binfmt.service.in b/units/systemd-binfmt.service.in
34index 02dfe77..86d3481 100644
35--- a/units/systemd-binfmt.service.in
36+++ b/units/systemd-binfmt.service.in
37@@ -11,6 +11,7 @@ Documentation=man:systemd-binfmt.service(8) man:binfmt.d(5)
38 Documentation=https://www.kernel.org/doc/Documentation/binfmt_misc.txt
39 DefaultDependencies=no
40 Conflicts=shutdown.target
41+Wants=proc-sys-fs-binfmt_misc.automount
42 After=systemd-readahead-collect.service systemd-readahead-replay.service proc-sys-fs-binfmt_misc.automount
43 Before=sysinit.target shutdown.target
44 ConditionPathIsReadWrite=/proc/sys/
45@@ -24,3 +25,6 @@ ConditionDirectoryNotEmpty=|/run/binfmt.d
46 Type=oneshot
47 RemainAfterExit=yes
48 ExecStart=@rootlibexecdir@/systemd-binfmt
49+
50+[Install]
51+WantedBy=sysinit.target
diff --git a/meta/recipes-core/systemd/systemd_206.bb b/meta/recipes-core/systemd/systemd_206.bb
index 75bdc61fbd..f31787d0f3 100644
--- a/meta/recipes-core/systemd/systemd_206.bb
+++ b/meta/recipes-core/systemd/systemd_206.bb
@@ -15,11 +15,12 @@ DEPENDS += "${@base_contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
15 15
16SECTION = "base/shell" 16SECTION = "base/shell"
17 17
18inherit gtk-doc useradd pkgconfig autotools perlnative update-rc.d update-alternatives qemu 18inherit gtk-doc useradd pkgconfig autotools perlnative update-rc.d update-alternatives qemu systemd
19 19
20SRC_URI = "http://www.freedesktop.org/software/systemd/systemd-${PV}.tar.xz \ 20SRC_URI = "http://www.freedesktop.org/software/systemd/systemd-${PV}.tar.xz \
21 file://0001-use-CAP_MKNOD-ConditionCapability.patch \ 21 file://0001-use-CAP_MKNOD-ConditionCapability.patch \
22 file://0001-Use-bin-mkdir-instead-of-host-mkdir-path.patch \ 22 file://0001-Use-bin-mkdir-instead-of-host-mkdir-path.patch \
23 file://binfmt-install.patch \
23 file://touchscreen.rules \ 24 file://touchscreen.rules \
24 ${UCLIBCPATCHES} \ 25 ${UCLIBCPATCHES} \
25 file://00-create-volatile.conf \ 26 file://00-create-volatile.conf \
@@ -119,7 +120,10 @@ python populate_packages_prepend (){
119} 120}
120PACKAGES_DYNAMIC += "^lib(udev|gudev|systemd).*" 121PACKAGES_DYNAMIC += "^lib(udev|gudev|systemd).*"
121 122
122PACKAGES =+ "${PN}-gui ${PN}-vconsole-setup ${PN}-initramfs ${PN}-analyze ${PN}-kernel-install ${PN}-rpm-macros" 123PACKAGES =+ "${PN}-gui ${PN}-vconsole-setup ${PN}-initramfs ${PN}-analyze ${PN}-kernel-install ${PN}-rpm-macros ${PN}-binfmt"
124
125SYSTEMD_PACKAGES = "${PN}-binfmt"
126SYSTEMD_SERVICE_${PN}-binfmt = "systemd-binfmt.service"
123 127
124USERADD_PACKAGES = "${PN}" 128USERADD_PACKAGES = "${PN}"
125GROUPADD_PARAM_${PN} = "-r lock; -r systemd-journal" 129GROUPADD_PARAM_${PN} = "-r lock; -r systemd-journal"
@@ -142,6 +146,13 @@ FILES_${PN}-kernel-install = "${bindir}/kernel-install \
142FILES_${PN}-rpm-macros = "${libdir}/rpm \ 146FILES_${PN}-rpm-macros = "${libdir}/rpm \
143 " 147 "
144 148
149FILES_${PN}-binfmt = "${sysconfdir}/binfmt.d/ \
150 ${exec_prefix}/lib/binfmt.d \
151 ${rootlibexecdir}/systemd/systemd-binfmt \
152 ${systemd_unitdir}/system/proc-sys-fs-binfmt_misc.* \
153 ${systemd_unitdir}/system/systemd-binfmt.service"
154RRECOMMENDS_${PN}-binfmt = "kernel-module-binfmt-misc"
155
145RRECOMMENDS_${PN}-vconsole-setup = "kbd kbd-consolefonts" 156RRECOMMENDS_${PN}-vconsole-setup = "kbd kbd-consolefonts"
146 157
147CONFFILES_${PN} = "${sysconfdir}/systemd/journald.conf \ 158CONFFILES_${PN} = "${sysconfdir}/systemd/journald.conf \
@@ -156,7 +167,6 @@ FILES_${PN} = " ${base_bindir}/* \
156 ${datadir}/polkit-1 \ 167 ${datadir}/polkit-1 \
157 ${datadir}/${BPN} \ 168 ${datadir}/${BPN} \
158 ${sysconfdir}/bash_completion.d/ \ 169 ${sysconfdir}/bash_completion.d/ \
159 ${sysconfdir}/binfmt.d/ \
160 ${sysconfdir}/dbus-1/ \ 170 ${sysconfdir}/dbus-1/ \
161 ${sysconfdir}/machine-id \ 171 ${sysconfdir}/machine-id \
162 ${sysconfdir}/modules-load.d/ \ 172 ${sysconfdir}/modules-load.d/ \
@@ -178,7 +188,6 @@ FILES_${PN} = " ${base_bindir}/* \
178 ${bindir}/kernel-install \ 188 ${bindir}/kernel-install \
179 ${exec_prefix}/lib/tmpfiles.d/*.conf \ 189 ${exec_prefix}/lib/tmpfiles.d/*.conf \
180 ${exec_prefix}/lib/systemd \ 190 ${exec_prefix}/lib/systemd \
181 ${exec_prefix}/lib/binfmt.d \
182 ${exec_prefix}/lib/modules-load.d \ 191 ${exec_prefix}/lib/modules-load.d \
183 ${exec_prefix}/lib/sysctl.d \ 192 ${exec_prefix}/lib/sysctl.d \
184 ${localstatedir} \ 193 ${localstatedir} \