diff options
author | Ross Burton <ross.burton@intel.com> | 2013-09-06 15:44:14 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-09-06 23:04:51 +0100 |
commit | 76e8678c2fc7870719f3be516b5c323a631374a9 (patch) | |
tree | 1ef83c9558ac2e3732de5e3754f9cd610f33f5b9 /meta/recipes-core | |
parent | 9b84fc7cc2a9100685e78a5fe051b3a7be5a540a (diff) | |
download | poky-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.patch | 51 | ||||
-rw-r--r-- | meta/recipes-core/systemd/systemd_206.bb | 17 |
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 @@ | |||
1 | Don'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 | |||
4 | Upstream-Status: Inappropriate(Makefile.am) / Submitted(units/) | ||
5 | Signed-off-by: Ross Burton <ross.burton@intel.com> | ||
6 | |||
7 | diff --git a/Makefile.am b/Makefile.am | ||
8 | index 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 += \ | ||
22 | diff --git a/units/proc-sys-fs-binfmt_misc.automount b/units/proc-sys-fs-binfmt_misc.automount | ||
23 | index 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 | ||
33 | diff --git a/units/systemd-binfmt.service.in b/units/systemd-binfmt.service.in | ||
34 | index 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 | ||
16 | SECTION = "base/shell" | 16 | SECTION = "base/shell" |
17 | 17 | ||
18 | inherit gtk-doc useradd pkgconfig autotools perlnative update-rc.d update-alternatives qemu | 18 | inherit gtk-doc useradd pkgconfig autotools perlnative update-rc.d update-alternatives qemu systemd |
19 | 19 | ||
20 | SRC_URI = "http://www.freedesktop.org/software/systemd/systemd-${PV}.tar.xz \ | 20 | SRC_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 | } |
120 | PACKAGES_DYNAMIC += "^lib(udev|gudev|systemd).*" | 121 | PACKAGES_DYNAMIC += "^lib(udev|gudev|systemd).*" |
121 | 122 | ||
122 | PACKAGES =+ "${PN}-gui ${PN}-vconsole-setup ${PN}-initramfs ${PN}-analyze ${PN}-kernel-install ${PN}-rpm-macros" | 123 | PACKAGES =+ "${PN}-gui ${PN}-vconsole-setup ${PN}-initramfs ${PN}-analyze ${PN}-kernel-install ${PN}-rpm-macros ${PN}-binfmt" |
124 | |||
125 | SYSTEMD_PACKAGES = "${PN}-binfmt" | ||
126 | SYSTEMD_SERVICE_${PN}-binfmt = "systemd-binfmt.service" | ||
123 | 127 | ||
124 | USERADD_PACKAGES = "${PN}" | 128 | USERADD_PACKAGES = "${PN}" |
125 | GROUPADD_PARAM_${PN} = "-r lock; -r systemd-journal" | 129 | GROUPADD_PARAM_${PN} = "-r lock; -r systemd-journal" |
@@ -142,6 +146,13 @@ FILES_${PN}-kernel-install = "${bindir}/kernel-install \ | |||
142 | FILES_${PN}-rpm-macros = "${libdir}/rpm \ | 146 | FILES_${PN}-rpm-macros = "${libdir}/rpm \ |
143 | " | 147 | " |
144 | 148 | ||
149 | FILES_${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" | ||
154 | RRECOMMENDS_${PN}-binfmt = "kernel-module-binfmt-misc" | ||
155 | |||
145 | RRECOMMENDS_${PN}-vconsole-setup = "kbd kbd-consolefonts" | 156 | RRECOMMENDS_${PN}-vconsole-setup = "kbd kbd-consolefonts" |
146 | 157 | ||
147 | CONFFILES_${PN} = "${sysconfdir}/systemd/journald.conf \ | 158 | CONFFILES_${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} \ |