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:01:52 +0100 |
commit | d42f7fc333495dc35227a6d1027492ab70f29b23 (patch) | |
tree | 14e09a4c5e4288d2d36203c16c012cd93587c53f /meta/recipes-core/systemd | |
parent | c0551436974d179df23418567f18a082830380f6 (diff) | |
download | openembedded-core-d42f7fc333495dc35227a6d1027492ab70f29b23.tar.gz openembedded-core-d42f7fc333495dc35227a6d1027492ab70f29b23.tar.bz2 openembedded-core-d42f7fc333495dc35227a6d1027492ab70f29b23.zip |
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')
-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 @@ +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 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)}" SECTION = "base/shell" -inherit gtk-doc useradd pkgconfig autotools perlnative update-rc.d update-alternatives qemu +inherit gtk-doc useradd pkgconfig autotools perlnative update-rc.d update-alternatives qemu systemd SRC_URI = "http://www.freedesktop.org/software/systemd/systemd-${PV}.tar.xz \ file://0001-use-CAP_MKNOD-ConditionCapability.patch \ file://0001-Use-bin-mkdir-instead-of-host-mkdir-path.patch \ + file://binfmt-install.patch \ file://touchscreen.rules \ ${UCLIBCPATCHES} \ file://00-create-volatile.conf \ @@ -119,7 +120,10 @@ python populate_packages_prepend (){ } PACKAGES_DYNAMIC += "^lib(udev|gudev|systemd).*" -PACKAGES =+ "${PN}-gui ${PN}-vconsole-setup ${PN}-initramfs ${PN}-analyze ${PN}-kernel-install ${PN}-rpm-macros" +PACKAGES =+ "${PN}-gui ${PN}-vconsole-setup ${PN}-initramfs ${PN}-analyze ${PN}-kernel-install ${PN}-rpm-macros ${PN}-binfmt" + +SYSTEMD_PACKAGES = "${PN}-binfmt" +SYSTEMD_SERVICE_${PN}-binfmt = "systemd-binfmt.service" USERADD_PACKAGES = "${PN}" GROUPADD_PARAM_${PN} = "-r lock; -r systemd-journal" @@ -142,6 +146,13 @@ FILES_${PN}-kernel-install = "${bindir}/kernel-install \ FILES_${PN}-rpm-macros = "${libdir}/rpm \ " +FILES_${PN}-binfmt = "${sysconfdir}/binfmt.d/ \ + ${exec_prefix}/lib/binfmt.d \ + ${rootlibexecdir}/systemd/systemd-binfmt \ + ${systemd_unitdir}/system/proc-sys-fs-binfmt_misc.* \ + ${systemd_unitdir}/system/systemd-binfmt.service" +RRECOMMENDS_${PN}-binfmt = "kernel-module-binfmt-misc" + RRECOMMENDS_${PN}-vconsole-setup = "kbd kbd-consolefonts" CONFFILES_${PN} = "${sysconfdir}/systemd/journald.conf \ @@ -156,7 +167,6 @@ FILES_${PN} = " ${base_bindir}/* \ ${datadir}/polkit-1 \ ${datadir}/${BPN} \ ${sysconfdir}/bash_completion.d/ \ - ${sysconfdir}/binfmt.d/ \ ${sysconfdir}/dbus-1/ \ ${sysconfdir}/machine-id \ ${sysconfdir}/modules-load.d/ \ @@ -178,7 +188,6 @@ FILES_${PN} = " ${base_bindir}/* \ ${bindir}/kernel-install \ ${exec_prefix}/lib/tmpfiles.d/*.conf \ ${exec_prefix}/lib/systemd \ - ${exec_prefix}/lib/binfmt.d \ ${exec_prefix}/lib/modules-load.d \ ${exec_prefix}/lib/sysctl.d \ ${localstatedir} \ |